home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Add-Ons / MPW / MPW noweb 2.7 / contrib / kostas / tex-support.el < prev    next >
LaTeX Document  |  1995-05-30  |  14.4 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
99% dexvert Texinfo Document (document/texInfo) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file TeX document text default
99% file LaTeX document text default
98% file Lisp/Scheme program text default
97% file Lisp/Scheme program, ASCII text, with CR line terminators default
100% TrID Summation Document Image Information Load File default (weak)
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[CR] default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 3b 20 4b 6f 73 74 61 | 73 20 4f 69 6b 6f 6e 6f |;; Kosta|s Oikono|
|00000010| 6d 6f 75 2c 20 53 65 70 | 74 65 6d 62 65 72 20 31 |mou, Sep|tember 1|
|00000020| 39 39 33 2e 0d 3b 3b 20 | 52 65 6d 6f 76 65 64 20 |993..;; |Removed |
|00000030| 74 68 65 20 73 75 70 70 | 6f 72 74 20 66 6f 72 20 |the supp|ort for |
|00000040| 70 6c 61 69 6e 20 54 65 | 58 2c 20 77 68 69 63 68 |plain Te|X, which|
|00000050| 20 64 69 64 6e 27 74 20 | 77 6f 72 6b 20 61 6e 79 | didn't |work any|
|00000060| 77 61 79 2e 0d 3b 3b 20 | 41 64 64 65 64 20 61 20 |way..;; |Added a |
|00000070| 6e 65 77 20 66 75 6e 63 | 74 69 6f 6e 20 6d 61 6b |new func|tion mak|
|00000080| 65 2d 66 69 6c 65 2c 20 | 62 61 73 65 64 20 6f 6e |e-file, |based on|
|00000090| 20 74 65 78 2d 66 69 6c | 65 2e 20 54 68 69 73 20 | tex-fil|e. This |
|000000a0| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 75 73 65 64 |function| is used|
|000000b0| 20 62 79 20 6e 6f 77 65 | 62 2d 6d 6f 64 65 2e 0d | by nowe|b-mode..|
|000000c0| 0d 3b 3b 20 4b 6f 73 74 | 61 73 20 4f 69 6b 6f 6e |.;; Kost|as Oikon|
|000000d0| 6f 6d 6f 75 2c 20 44 65 | 63 65 6d 62 65 72 20 31 |omou, De|cember 1|
|000000e0| 39 39 32 2e 0d 3b 3b 20 | 54 68 69 73 20 69 73 20 |992..;; |This is |
|000000f0| 68 61 63 6b 65 64 20 66 | 72 6f 6d 20 74 65 78 2d |hacked f|rom tex-|
|00000100| 6d 6f 64 65 2e 65 6c 2e | 20 41 20 6c 6f 74 20 6f |mode.el.| A lot o|
|00000110| 66 20 63 6f 64 65 20 68 | 61 73 20 62 65 65 6e 20 |f code h|as been |
|00000120| 72 65 6d 6f 76 65 64 2e | 0d 3b 3b 20 42 65 73 69 |removed.|.;; Besi|
|00000130| 64 65 73 20 74 68 61 74 | 2c 20 74 68 65 20 6d 6f |des that|, the mo|
|00000140| 73 74 20 6e 6f 74 61 62 | 6c 65 20 6d 6f 64 69 66 |st notab|le modif|
|00000150| 69 63 61 74 69 6f 6e 73 | 20 61 72 65 20 74 68 61 |ications| are tha|
|00000160| 74 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 |t the fu|nctions |
|00000170| 6c 61 74 65 78 2d 6d 6f | 64 65 0d 3b 3b 20 61 6e |latex-mo|de.;; an|
|00000180| 64 20 74 65 78 2d 6d 6f | 64 65 20 28 77 68 69 63 |d tex-mo|de (whic|
|00000190| 68 20 63 6f 6e 66 6c 69 | 63 74 20 77 69 74 68 20 |h confli|ct with |
|000001a0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 69 6e |the func|tions in|
|000001b0| 20 42 65 65 62 65 27 73 | 20 6c 61 74 65 78 2e 65 | Beebe's| latex.e|
|000001c0| 6c 29 20 68 61 76 65 20 | 62 65 65 6e 0d 3b 3b 20 |l) have |been.;; |
|000001d0| 72 65 6e 61 6d 65 64 20 | 73 65 74 75 70 2d 6c 61 |renamed |setup-la|
|000001e0| 74 65 78 20 61 6e 64 20 | 73 65 74 75 70 2d 74 65 |tex and |setup-te|
|000001f0| 78 2e 20 54 68 65 73 65 | 20 66 75 6e 63 74 69 6f |x. These| functio|
|00000200| 6e 73 20 6d 75 73 74 20 | 62 65 20 63 61 6c 6c 65 |ns must |be calle|
|00000210| 64 20 62 79 20 4c 61 54 | 65 58 2d 6d 6f 64 65 2d |d by LaT|eX-mode-|
|00000220| 68 6f 6f 6b 20 0d 3b 3b | 20 61 6e 64 20 54 65 58 |hook .;;| and TeX|
|00000230| 2d 6d 6f 64 65 2d 68 6f | 6f 6b 20 66 6f 72 20 74 |-mode-ho|ok for t|
|00000240| 68 69 6e 67 73 20 74 6f | 20 77 6f 72 6b 20 70 72 |hings to| work pr|
|00000250| 6f 70 65 72 6c 79 2e 0d | 3b 3b 20 4f 74 68 65 72 |operly..|;; Other|
|00000260| 20 6d 6f 64 69 66 69 63 | 61 74 69 6f 6e 73 3a 0d | modific|ations:.|
|00000270| 3b 3b 20 20 31 29 20 41 | 20 6c 69 6e 65 20 68 61 |;; 1) A| line ha|
|00000280| 73 20 62 65 65 6e 20 61 | 64 64 65 64 20 74 6f 20 |s been a|dded to |
|00000290| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 74 65 78 |the func|tion tex|
|000002a0| 2d 66 69 6c 65 2e 0d 3b | 3b 20 20 32 29 20 54 68 |-file..;|; 2) Th|
|000002b0| 65 20 22 2d 76 22 20 68 | 61 73 20 62 65 65 6e 20 |e "-v" h|as been |
|000002c0| 64 65 6c 65 74 65 64 20 | 66 72 6f 6d 20 74 68 65 |deleted |from the|
|000002d0| 20 6d 61 6b 65 2d 63 6f | 6d 69 6e 74 20 6c 69 6e | make-co|mint lin|
|000002e0| 65 2e 0d 3b 3b 20 20 33 | 29 20 54 77 6f 20 6c 69 |e..;; 3|) Two li|
|000002f0| 6e 65 73 20 68 61 76 65 | 20 62 65 65 6e 20 61 64 |nes have| been ad|
|00000300| 64 65 64 20 6e 65 61 72 | 20 74 68 65 20 65 6e 64 |ded near| the end|
|00000310| 20 6f 66 20 74 65 78 2d | 66 69 6c 65 20 74 6f 20 | of tex-|file to |
|00000320| 6b 65 65 70 20 74 68 65 | 20 6f 75 74 70 75 74 0d |keep the| output.|
|00000330| 3b 3b 20 20 20 20 20 69 | 6e 20 2a 74 65 78 2d 73 |;; i|n *tex-s|
|00000340| 68 65 6c 6c 2a 20 76 69 | 73 69 62 6c 65 2e 20 53 |hell* vi|sible. S|
|00000350| 61 6d 65 20 77 61 73 20 | 64 6f 6e 65 20 74 6f 20 |ame was |done to |
|00000360| 74 65 78 2d 72 65 67 69 | 6f 6e 2e 0d 3b 3b 20 20 |tex-regi|on..;; |
|00000370| 34 29 20 54 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |4) The f|unction |
|00000380| 74 65 78 2d 64 65 6c 65 | 74 65 2d 74 65 6d 70 2d |tex-dele|te-temp-|
|00000390| 66 69 6c 65 73 20 68 61 | 73 20 62 65 65 6e 20 6d |files ha|s been m|
|000003a0| 61 64 65 20 69 6e 74 65 | 72 61 63 74 69 76 65 2e |ade inte|ractive.|
|000003b0| 0d 3b 3b 0d 3b 3b 20 53 | 74 69 6c 6c 20 74 6f 20 |.;;.;; S|till to |
|000003c0| 64 6f 3a 0d 3b 3b 20 20 | 61 29 20 55 73 65 20 72 |do:.;; |a) Use r|
|000003d0| 65 2d 73 65 61 72 63 68 | 20 66 6f 72 20 74 65 78 |e-search| for tex|
|000003e0| 2d 73 74 61 72 74 2d 6f | 66 2d 68 65 61 64 65 72 |-start-o|f-header|
|000003f0| 2c 20 65 74 63 2e 2c 20 | 73 6f 20 62 6f 74 68 20 |, etc., |so both |
|00000400| 22 5c 62 65 67 69 6e 7b | 64 6f 63 75 6d 65 6e 74 |"\begin{|document|
|00000410| 7d 22 20 61 6e 64 20 0d | 3b 3b 20 20 20 20 20 22 |}" and .|;; "|
|00000420| 5c 62 65 67 69 6e 20 7b | 64 6f 63 75 6d 65 6e 74 |\begin {|document|
|00000430| 7d 22 20 63 61 6e 20 62 | 65 20 75 73 65 64 2e 0d |}" can b|e used..|
|00000440| 0d 0d 28 72 65 71 75 69 | 72 65 20 27 63 6f 6d 69 |..(requi|re 'comi|
|00000450| 6e 74 29 0d 28 70 72 6f | 76 69 64 65 20 27 74 65 |nt).(pro|vide 'te|
|00000460| 78 2d 73 75 70 70 6f 72 | 74 29 0d 0d 28 64 65 66 |x-suppor|t)..(def|
|00000470| 76 61 72 20 74 65 78 2d | 73 68 65 6c 6c 2d 66 69 |var tex-|shell-fi|
|00000480| 6c 65 2d 6e 61 6d 65 20 | 6e 69 6c 0d 20 20 22 2a |le-name |nil. "*|
|00000490| 49 66 20 6e 6f 6e 2d 6e | 69 6c 2c 20 69 73 20 66 |If non-n|il, is f|
|000004a0| 69 6c 65 20 6e 61 6d 65 | 20 74 6f 20 75 73 65 20 |ile name| to use |
|000004b0| 66 6f 72 20 74 68 65 20 | 73 75 62 73 68 65 6c 6c |for the |subshell|
|000004c0| 20 69 6e 20 77 68 69 63 | 68 20 54 65 58 20 69 73 | in whic|h TeX is|
|000004d0| 20 72 75 6e 2e 22 29 0d | 0d 28 64 65 66 76 61 72 | run.").|.(defvar|
|000004e0| 20 74 65 78 2d 64 69 72 | 65 63 74 6f 72 79 20 22 | tex-dir|ectory "|
|000004f0| 2e 22 0d 20 20 22 2a 44 | 69 72 65 63 74 6f 72 79 |.". "*D|irectory|
|00000500| 20 69 6e 20 77 68 69 63 | 68 20 74 65 6d 70 6f 72 | in whic|h tempor|
|00000510| 61 72 79 20 66 69 6c 65 | 73 20 61 72 65 20 6c 65 |ary file|s are le|
|00000520| 66 74 2e 0d 59 6f 75 20 | 63 61 6e 20 6d 61 6b 65 |ft..You |can make|
|00000530| 20 74 68 69 73 20 2f 74 | 6d 70 20 69 66 20 79 6f | this /t|mp if yo|
|00000540| 75 72 20 54 45 58 49 4e | 50 55 54 53 20 68 61 73 |ur TEXIN|PUTS has|
|00000550| 20 6e 6f 20 72 65 6c 61 | 74 69 76 65 20 64 69 72 | no rela|tive dir|
|00000560| 65 63 74 6f 72 69 65 73 | 20 69 6e 20 69 74 0d 61 |ectories| in it.a|
|00000570| 6e 64 20 79 6f 75 20 64 | 6f 6e 27 74 20 74 72 79 |nd you d|on't try|
|00000580| 20 74 6f 20 61 70 70 6c | 79 20 5c 5c 5b 74 65 78 | to appl|y \\[tex|
|00000590| 2d 72 65 67 69 6f 6e 5d | 20 6f 72 20 5c 5c 5b 74 |-region]| or \\[t|
|000005a0| 65 78 2d 62 75 66 66 65 | 72 5d 20 77 68 65 6e 20 |ex-buffe|r] when |
|000005b0| 74 68 65 72 65 20 61 72 | 65 0d 5c 5c 69 6e 70 75 |there ar|e.\\inpu|
|000005c0| 74 20 63 6f 6d 6d 61 6e | 64 73 20 77 69 74 68 20 |t comman|ds with |
|000005d0| 72 65 6c 61 74 69 76 65 | 20 64 69 72 65 63 74 6f |relative| directo|
|000005e0| 72 69 65 73 2e 22 29 0d | 0d 28 64 65 66 76 61 72 |ries.").|.(defvar|
|000005f0| 20 6c 61 74 65 78 2d 72 | 75 6e 2d 63 6f 6d 6d 61 | latex-r|un-comma|
|00000600| 6e 64 20 22 6c 61 74 65 | 78 22 0d 20 20 22 2a 43 |nd "late|x". "*C|
|00000610| 6f 6d 6d 61 6e 64 20 75 | 73 65 64 20 74 6f 20 72 |ommand u|sed to r|
|00000620| 75 6e 20 4c 61 54 65 58 | 20 73 75 62 6a 6f 62 2e |un LaTeX| subjob.|
|00000630| 0d 49 66 20 74 68 69 73 | 20 73 74 72 69 6e 67 20 |.If this| string |
|00000640| 63 6f 6e 74 61 69 6e 73 | 20 61 6e 20 61 73 74 65 |contains| an aste|
|00000650| 72 69 73 6b 20 28 2a 29 | 2c 20 69 74 20 77 69 6c |risk (*)|, it wil|
|00000660| 6c 20 62 65 20 72 65 70 | 6c 61 63 65 64 20 62 79 |l be rep|laced by|
|00000670| 20 74 68 65 0d 66 69 6c | 65 6e 61 6d 65 3b 20 69 | the.fil|ename; i|
|00000680| 66 20 6e 6f 74 2c 20 74 | 68 65 20 6e 61 6d 65 20 |f not, t|he name |
|00000690| 6f 66 20 74 68 65 20 66 | 69 6c 65 2c 20 70 72 65 |of the f|ile, pre|
|000006a0| 63 65 64 65 64 20 62 79 | 20 62 6c 61 6e 6b 2c 20 |ceded by| blank, |
|000006b0| 77 69 6c 6c 20 62 65 20 | 61 64 64 65 64 20 74 6f |will be |added to|
|000006c0| 0d 74 68 69 73 20 73 74 | 72 69 6e 67 2e 22 29 0d |.this st|ring.").|
|000006d0| 0d 28 64 65 66 76 61 72 | 20 74 65 78 2d 64 76 69 |.(defvar| tex-dvi|
|000006e0| 2d 70 72 69 6e 74 2d 63 | 6f 6d 6d 61 6e 64 20 22 |-print-c|ommand "|
|000006f0| 6c 70 72 20 2d 64 22 0d | 20 20 22 2a 43 6f 6d 6d |lpr -d".| "*Comm|
|00000700| 61 6e 64 20 75 73 65 64 | 20 62 79 20 5c 5c 5b 74 |and used| by \\[t|
|00000710| 65 78 2d 70 72 69 6e 74 | 5d 20 74 6f 20 70 72 69 |ex-print|] to pri|
|00000720| 6e 74 20 61 20 2e 64 76 | 69 20 66 69 6c 65 2e 0d |nt a .dv|i file..|
|00000730| 49 66 20 74 68 69 73 20 | 73 74 72 69 6e 67 20 63 |If this |string c|
|00000740| 6f 6e 74 61 69 6e 73 20 | 61 6e 20 61 73 74 65 72 |ontains |an aster|
|00000750| 69 73 6b 20 28 2a 29 2c | 20 69 74 20 77 69 6c 6c |isk (*),| it will|
|00000760| 20 62 65 20 72 65 70 6c | 61 63 65 64 20 62 79 20 | be repl|aced by |
|00000770| 74 68 65 0d 66 69 6c 65 | 6e 61 6d 65 3b 20 69 66 |the.file|name; if|
|00000780| 20 6e 6f 74 2c 20 74 68 | 65 20 6e 61 6d 65 20 6f | not, th|e name o|
|00000790| 66 20 74 68 65 20 66 69 | 6c 65 2c 20 70 72 65 63 |f the fi|le, prec|
|000007a0| 65 64 65 64 20 62 79 20 | 62 6c 61 6e 6b 2c 20 77 |eded by |blank, w|
|000007b0| 69 6c 6c 20 62 65 20 61 | 64 64 65 64 20 74 6f 0d |ill be a|dded to.|
|000007c0| 74 68 69 73 20 73 74 72 | 69 6e 67 2e 22 29 0d 0d |this str|ing.")..|
|000007d0| 28 64 65 66 76 61 72 20 | 74 65 78 2d 61 6c 74 2d |(defvar |tex-alt-|
|000007e0| 64 76 69 2d 70 72 69 6e | 74 2d 63 6f 6d 6d 61 6e |dvi-prin|t-comman|
|000007f0| 64 20 22 6c 70 72 20 2d | 64 22 0d 20 20 22 2a 43 |d "lpr -|d". "*C|
|00000800| 6f 6d 6d 61 6e 64 20 75 | 73 65 64 20 62 79 20 5c |ommand u|sed by \|
|00000810| 5c 5b 74 65 78 2d 70 72 | 69 6e 74 5d 20 77 69 74 |\[tex-pr|int] wit|
|00000820| 68 20 61 20 70 72 65 66 | 69 78 20 61 72 67 20 74 |h a pref|ix arg t|
|00000830| 6f 20 70 72 69 6e 74 20 | 61 20 2e 64 76 69 20 66 |o print |a .dvi f|
|00000840| 69 6c 65 2e 0d 49 66 20 | 74 68 69 73 20 73 74 72 |ile..If |this str|
|00000850| 69 6e 67 20 63 6f 6e 74 | 61 69 6e 73 20 61 6e 20 |ing cont|ains an |
|00000860| 61 73 74 65 72 69 73 6b | 20 28 2a 29 2c 20 69 74 |asterisk| (*), it|
|00000870| 20 77 69 6c 6c 20 62 65 | 20 72 65 70 6c 61 63 65 | will be| replace|
|00000880| 64 20 62 79 20 74 68 65 | 0d 66 69 6c 65 6e 61 6d |d by the|.filenam|
|00000890| 65 3b 20 69 66 20 6e 6f | 74 2c 20 74 68 65 20 6e |e; if no|t, the n|
|000008a0| 61 6d 65 20 6f 66 20 74 | 68 65 20 66 69 6c 65 2c |ame of t|he file,|
|000008b0| 20 70 72 65 63 65 64 65 | 64 20 62 79 20 62 6c 61 | precede|d by bla|
|000008c0| 6e 6b 2c 20 77 69 6c 6c | 20 62 65 20 61 64 64 65 |nk, will| be adde|
|000008d0| 64 20 74 6f 0d 74 68 69 | 73 20 73 74 72 69 6e 67 |d to.thi|s string|
|000008e0| 2e 0d 0d 49 66 20 74 77 | 6f 20 70 72 69 6e 74 65 |...If tw|o printe|
|000008f0| 72 73 20 61 72 65 20 6e | 6f 74 20 65 6e 6f 75 67 |rs are n|ot enoug|
|00000900| 68 20 6f 66 20 61 20 63 | 68 6f 69 63 65 2c 20 79 |h of a c|hoice, y|
|00000910| 6f 75 20 63 61 6e 20 64 | 65 66 69 6e 65 20 74 68 |ou can d|efine th|
|00000920| 65 20 76 61 6c 75 65 0d | 6f 66 20 74 65 78 2d 61 |e value.|of tex-a|
|00000930| 6c 74 2d 64 76 69 2d 70 | 72 69 6e 74 2d 63 6f 6d |lt-dvi-p|rint-com|
|00000940| 6d 61 6e 64 20 74 6f 20 | 62 65 20 61 6e 20 65 78 |mand to |be an ex|
|00000950| 70 72 65 73 73 69 6f 6e | 20 74 68 61 74 20 61 73 |pression| that as|
|00000960| 6b 73 20 77 68 61 74 20 | 79 6f 75 20 77 61 6e 74 |ks what |you want|
|00000970| 3b 0d 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0d 0d |;.for ex|ample,..|
|00000980| 20 20 20 20 28 73 65 74 | 71 20 74 65 78 2d 61 6c | (set|q tex-al|
|00000990| 74 2d 64 76 69 2d 70 72 | 69 6e 74 2d 63 6f 6d 6d |t-dvi-pr|int-comm|
|000009a0| 61 6e 64 0d 20 20 20 20 | 20 20 20 20 20 27 28 66 |and. | '(f|
|000009b0| 6f 72 6d 61 74 20 5c 22 | 6c 70 72 20 2d 50 25 73 |ormat \"|lpr -P%s|
|000009c0| 5c 22 20 28 72 65 61 64 | 2d 73 74 72 69 6e 67 20 |\" (read|-string |
|000009d0| 5c 22 55 73 65 20 70 72 | 69 6e 74 65 72 3a 20 5c |\"Use pr|inter: \|
|000009e0| 22 29 29 29 0d 0d 77 6f | 75 6c 64 20 74 65 6c 6c |")))..wo|uld tell|
|000009f0| 20 5c 5c 5b 74 65 78 2d | 70 72 69 6e 74 5d 20 77 | \\[tex-|print] w|
|00000a00| 69 74 68 20 61 20 70 72 | 65 66 69 78 20 61 72 67 |ith a pr|efix arg|
|00000a10| 75 6d 65 6e 74 20 74 6f | 20 61 73 6b 20 79 6f 75 |ument to| ask you|
|00000a20| 20 77 68 69 63 68 20 70 | 72 69 6e 74 65 72 20 74 | which p|rinter t|
|00000a30| 6f 0d 75 73 65 2e 22 29 | 0d 0d 28 64 65 66 76 61 |o.use.")|..(defva|
|00000a40| 72 20 74 65 78 2d 64 76 | 69 2d 76 69 65 77 2d 63 |r tex-dv|i-view-c|
|00000a50| 6f 6d 6d 61 6e 64 20 6e | 69 6c 0d 20 20 22 2a 43 |ommand n|il. "*C|
|00000a60| 6f 6d 6d 61 6e 64 20 75 | 73 65 64 20 62 79 20 5c |ommand u|sed by \|
|00000a70| 5c 5b 74 65 78 2d 76 69 | 65 77 5d 20 74 6f 20 64 |\[tex-vi|ew] to d|
|00000a80| 69 73 70 6c 61 79 20 61 | 20 2e 64 76 69 20 66 69 |isplay a| .dvi fi|
|00000a90| 6c 65 2e 0d 49 66 20 74 | 68 69 73 20 73 74 72 69 |le..If t|his stri|
|00000aa0| 6e 67 20 63 6f 6e 74 61 | 69 6e 73 20 61 6e 20 61 |ng conta|ins an a|
|00000ab0| 73 74 65 72 69 73 6b 20 | 28 2a 29 2c 20 69 74 20 |sterisk |(*), it |
|00000ac0| 77 69 6c 6c 20 62 65 20 | 72 65 70 6c 61 63 65 64 |will be |replaced|
|00000ad0| 20 62 79 20 74 68 65 0d | 66 69 6c 65 6e 61 6d 65 | by the.|filename|
|00000ae0| 3b 20 69 66 20 6e 6f 74 | 2c 20 74 68 65 20 6e 61 |; if not|, the na|
|00000af0| 6d 65 20 6f 66 20 74 68 | 65 20 66 69 6c 65 2c 20 |me of th|e file, |
|00000b00| 70 72 65 63 65 64 65 64 | 20 62 79 20 62 6c 61 6e |preceded| by blan|
|00000b10| 6b 2c 20 77 69 6c 6c 20 | 62 65 20 61 64 64 65 64 |k, will |be added|
|00000b20| 20 74 6f 0d 74 68 69 73 | 20 73 74 72 69 6e 67 2e | to.this| string.|
|00000b30| 0d 0d 54 68 69 73 20 63 | 61 6e 20 62 65 20 73 65 |..This c|an be se|
|00000b40| 74 20 63 6f 6e 64 69 74 | 69 6f 6e 61 6c 6c 79 20 |t condit|ionally |
|00000b50| 73 6f 20 74 68 61 74 20 | 74 68 65 20 70 72 65 76 |so that |the prev|
|00000b60| 69 65 77 65 72 20 75 73 | 65 64 20 69 73 20 73 75 |iewer us|ed is su|
|00000b70| 69 74 61 62 6c 65 20 66 | 6f 72 20 74 68 65 0d 77 |itable f|or the.w|
|00000b80| 69 6e 64 6f 77 20 73 79 | 73 74 65 6d 20 62 65 69 |indow sy|stem bei|
|00000b90| 6e 67 20 75 73 65 64 2e | 20 20 46 6f 72 20 65 78 |ng used.| For ex|
|00000ba0| 61 6d 70 6c 65 2c 0d 0d | 20 20 20 20 28 73 65 74 |ample,..| (set|
|00000bb0| 71 20 74 65 78 2d 64 76 | 69 2d 76 69 65 77 2d 63 |q tex-dv|i-view-c|
|00000bc0| 6f 6d 6d 61 6e 64 0d 20 | 20 20 20 20 20 20 20 20 |ommand. | |
|00000bd0| 20 28 69 66 20 28 65 71 | 20 77 69 6e 64 6f 77 2d | (if (eq| window-|
|00000be0| 73 79 73 74 65 6d 20 27 | 78 29 20 5c 22 78 64 76 |system '|x) \"xdv|
|00000bf0| 69 5c 22 20 5c 22 64 76 | 69 32 74 74 79 20 2a 20 |i\" \"dv|i2tty * |
|00000c00| 7c 20 63 61 74 20 2d 73 | 5c 22 29 29 0d 0d 77 6f || cat -s|\"))..wo|
|00000c10| 75 6c 64 20 74 65 6c 6c | 20 5c 5c 5b 74 65 78 2d |uld tell| \\[tex-|
|00000c20| 76 69 65 77 5d 20 75 73 | 65 20 78 64 76 69 20 75 |view] us|e xdvi u|
|00000c30| 6e 64 65 72 20 58 20 77 | 69 6e 64 6f 77 73 20 61 |nder X w|indows a|
|00000c40| 6e 64 20 74 6f 20 75 73 | 65 20 64 76 69 32 74 74 |nd to us|e dvi2tt|
|00000c50| 79 0d 6f 74 68 65 72 77 | 69 73 65 2e 22 29 0d 0d |y.otherw|ise.")..|
|00000c60| 0d 28 64 65 66 76 61 72 | 20 74 65 78 2d 6c 61 73 |.(defvar| tex-las|
|00000c70| 74 2d 74 65 6d 70 2d 66 | 69 6c 65 20 6e 69 6c 0d |t-temp-f|ile nil.|
|00000c80| 20 20 22 4c 61 74 65 73 | 74 20 74 65 6d 70 6f 72 | "Lates|t tempor|
|00000c90| 61 72 79 20 66 69 6c 65 | 20 67 65 6e 65 72 61 74 |ary file| generat|
|00000ca0| 65 64 20 62 79 20 5c 5c | 5b 74 65 78 2d 72 65 67 |ed by \\|[tex-reg|
|00000cb0| 69 6f 6e 5d 20 61 6e 64 | 20 5c 5c 5b 74 65 78 2d |ion] and| \\[tex-|
|00000cc0| 62 75 66 66 65 72 5d 2e | 0d 44 65 6c 65 74 65 64 |buffer].|.Deleted|
|00000cd0| 20 77 68 65 6e 20 74 68 | 65 20 5c 5c 5b 74 65 78 | when th|e \\[tex|
|00000ce0| 2d 72 65 67 69 6f 6e 5d | 20 6f 72 20 5c 5c 5b 74 |-region]| or \\[t|
|00000cf0| 65 78 2d 62 75 66 66 65 | 72 5d 20 69 73 20 6e 65 |ex-buffe|r] is ne|
|00000d00| 78 74 20 72 75 6e 2c 20 | 6f 72 20 77 68 65 6e 20 |xt run, |or when |
|00000d10| 74 68 65 0d 74 65 78 2d | 73 68 65 6c 6c 20 67 6f |the.tex-|shell go|
|00000d20| 65 73 20 61 77 61 79 2e | 22 29 0d 0d 28 64 65 66 |es away.|")..(def|
|00000d30| 76 61 72 20 74 65 78 2d | 63 6f 6d 6d 61 6e 64 20 |var tex-|command |
|00000d40| 6e 69 6c 0d 20 20 22 43 | 6f 6d 6d 61 6e 64 20 74 |nil. "C|ommand t|
|00000d50| 6f 20 72 75 6e 20 54 65 | 58 2e 0d 54 68 65 20 6e |o run Te|X..The n|
|00000d60| 61 6d 65 20 6f 66 20 74 | 68 65 20 66 69 6c 65 2c |ame of t|he file,|
|00000d70| 20 70 72 65 63 65 64 65 | 64 20 62 79 20 61 20 62 | precede|d by a b|
|00000d80| 6c 61 6e 6b 2c 20 77 69 | 6c 6c 20 62 65 20 61 64 |lank, wi|ll be ad|
|00000d90| 64 65 64 20 74 6f 20 74 | 68 69 73 20 73 74 72 69 |ded to t|his stri|
|00000da0| 6e 67 2e 22 29 0d 0d 28 | 64 65 66 76 61 72 20 74 |ng.")..(|defvar t|
|00000db0| 65 78 2d 74 72 61 69 6c | 65 72 20 6e 69 6c 0d 20 |ex-trail|er nil. |
|00000dc0| 20 22 53 74 72 69 6e 67 | 20 61 70 70 65 6e 64 65 | "String| appende|
|00000dd0| 64 20 61 66 74 65 72 20 | 74 68 65 20 65 6e 64 20 |d after |the end |
|00000de0| 6f 66 20 61 20 72 65 67 | 69 6f 6e 20 73 65 6e 74 |of a reg|ion sent|
|00000df0| 20 74 6f 20 54 65 58 20 | 62 79 20 5c 5c 5b 74 65 | to TeX |by \\[te|
|00000e00| 78 2d 72 65 67 69 6f 6e | 5d 2e 22 29 0d 0d 28 64 |x-region|].")..(d|
|00000e10| 65 66 76 61 72 20 74 65 | 78 2d 73 74 61 72 74 2d |efvar te|x-start-|
|00000e20| 6f 66 2d 68 65 61 64 65 | 72 20 6e 69 6c 0d 20 20 |of-heade|r nil. |
|00000e30| 22 53 74 72 69 6e 67 20 | 75 73 65 64 20 62 79 20 |"String |used by |
|00000e40| 5c 5c 5b 74 65 78 2d 72 | 65 67 69 6f 6e 5d 20 74 |\\[tex-r|egion] t|
|00000e50| 6f 20 64 65 6c 69 6d 69 | 74 20 74 68 65 20 73 74 |o delimi|t the st|
|00000e60| 61 72 74 20 6f 66 20 74 | 68 65 20 66 69 6c 65 27 |art of t|he file'|
|00000e70| 73 20 68 65 61 64 65 72 | 2e 22 29 0d 0d 28 64 65 |s header|.")..(de|
|00000e80| 66 76 61 72 20 74 65 78 | 2d 65 6e 64 2d 6f 66 2d |fvar tex|-end-of-|
|00000e90| 68 65 61 64 65 72 20 6e | 69 6c 0d 20 20 22 53 74 |header n|il. "St|
|00000ea0| 72 69 6e 67 20 75 73 65 | 64 20 62 79 20 5c 5c 5b |ring use|d by \\[|
|00000eb0| 74 65 78 2d 72 65 67 69 | 6f 6e 5d 20 74 6f 20 64 |tex-regi|on] to d|
|00000ec0| 65 6c 69 6d 69 74 20 74 | 68 65 20 65 6e 64 20 6f |elimit t|he end o|
|00000ed0| 66 20 74 68 65 20 66 69 | 6c 65 27 73 20 68 65 61 |f the fi|le's hea|
|00000ee0| 64 65 72 2e 22 29 0d 0d | 28 64 65 66 76 61 72 20 |der.")..|(defvar |
|00000ef0| 74 65 78 2d 73 68 65 6c | 6c 2d 63 64 2d 63 6f 6d |tex-shel|l-cd-com|
|00000f00| 6d 61 6e 64 20 22 63 64 | 22 0d 20 20 22 43 6f 6d |mand "cd|". "Com|
|00000f10| 6d 61 6e 64 20 74 6f 20 | 67 69 76 65 20 74 6f 20 |mand to |give to |
|00000f20| 73 68 65 6c 6c 20 72 75 | 6e 6e 69 6e 67 20 54 65 |shell ru|nning Te|
|00000f30| 58 20 74 6f 20 63 68 61 | 6e 67 65 20 64 69 72 65 |X to cha|nge dire|
|00000f40| 63 74 6f 72 79 2e 0d 54 | 68 65 20 76 61 6c 75 65 |ctory..T|he value|
|00000f50| 20 6f 66 20 74 65 78 2d | 64 69 72 65 63 74 6f 72 | of tex-|director|
|00000f60| 79 20 77 69 6c 6c 20 62 | 65 20 61 70 70 65 6e 64 |y will b|e append|
|00000f70| 65 64 20 74 6f 20 74 68 | 69 73 2c 20 73 65 70 61 |ed to th|is, sepa|
|00000f80| 72 61 74 65 64 20 62 79 | 20 61 20 73 70 61 63 65 |rated by| a space|
|00000f90| 2e 22 29 0d 0d 28 64 65 | 66 76 61 72 20 74 65 78 |.")..(de|fvar tex|
|00000fa0| 2d 7a 61 70 2d 66 69 6c | 65 20 6e 69 6c 0d 20 20 |-zap-fil|e nil. |
|00000fb0| 22 54 65 6d 70 6f 72 61 | 72 79 20 66 69 6c 65 20 |"Tempora|ry file |
|00000fc0| 6e 61 6d 65 20 75 73 65 | 64 20 66 6f 72 20 74 65 |name use|d for te|
|00000fd0| 78 74 20 62 65 69 6e 67 | 20 73 65 6e 74 20 61 73 |xt being| sent as|
|00000fe0| 20 69 6e 70 75 74 20 74 | 6f 20 54 65 58 2e 0d 53 | input t|o TeX..S|
|00000ff0| 68 6f 75 6c 64 20 62 65 | 20 61 20 73 69 6d 70 6c |hould be| a simpl|
|00001000| 65 20 66 69 6c 65 20 6e | 61 6d 65 20 77 69 74 68 |e file n|ame with|
|00001010| 20 6e 6f 20 65 78 74 65 | 6e 73 69 6f 6e 20 6f 72 | no exte|nsion or|
|00001020| 20 64 69 72 65 63 74 6f | 72 79 20 73 70 65 63 69 | directo|ry speci|
|00001030| 66 69 63 61 74 69 6f 6e | 2e 22 29 0d 0d 28 64 65 |fication|.")..(de|
|00001040| 66 76 61 72 20 74 65 78 | 2d 6c 61 73 74 2d 62 75 |fvar tex|-last-bu|
|00001050| 66 66 65 72 2d 74 65 78 | 65 64 20 6e 69 6c 0d 20 |ffer-tex|ed nil. |
|00001060| 20 22 42 75 66 66 65 72 | 20 77 68 69 63 68 20 77 | "Buffer| which w|
|00001070| 61 73 20 6c 61 73 74 20 | 54 65 58 65 64 2e 22 29 |as last |TeXed.")|
|00001080| 0d 0d 0d 28 64 65 66 76 | 61 72 20 74 65 78 2d 70 |...(defv|ar tex-p|
|00001090| 72 69 6e 74 2d 66 69 6c | 65 20 6e 69 6c 0d 20 20 |rint-fil|e nil. |
|000010a0| 22 46 69 6c 65 20 6e 61 | 6d 65 20 74 68 61 74 20 |"File na|me that |
|000010b0| 5c 5c 5b 74 65 78 2d 70 | 72 69 6e 74 5d 20 70 72 |\\[tex-p|rint] pr|
|000010c0| 69 6e 74 73 2e 0d 53 65 | 74 20 62 79 20 5c 5c 5b |ints..Se|t by \\[|
|000010d0| 74 65 78 2d 72 65 67 69 | 6f 6e 5d 2c 20 5c 5c 5b |tex-regi|on], \\[|
|000010e0| 74 65 78 2d 62 75 66 66 | 65 72 5d 2c 20 61 6e 64 |tex-buff|er], and|
|000010f0| 20 5c 5c 5b 74 65 78 2d | 66 69 6c 65 5d 2e 22 29 | \\[tex-|file].")|
|00001100| 0d 0d 0d 28 64 65 66 76 | 61 72 20 74 65 78 2d 73 |...(defv|ar tex-s|
|00001110| 68 65 6c 6c 2d 6d 61 70 | 20 6e 69 6c 0d 20 20 22 |hell-map| nil. "|
|00001120| 4b 65 79 6d 61 70 20 66 | 6f 72 20 74 68 65 20 74 |Keymap f|or the t|
|00001130| 65 78 2d 73 68 65 6c 6c | 2e 20 20 41 20 63 6f 6d |ex-shell|. A com|
|00001140| 69 6e 74 2d 6d 6f 64 65 | 2d 6d 61 70 20 77 69 74 |int-mode|-map wit|
|00001150| 68 20 61 20 66 65 77 20 | 61 64 64 69 74 69 6f 6e |h a few |addition|
|00001160| 73 2e 22 29 0d 0d 0d 28 | 64 65 66 75 6e 20 73 65 |s.")...(|defun se|
|00001170| 74 75 70 2d 6c 61 74 65 | 78 20 28 29 0d 20 20 22 |tup-late|x (). "|
|00001180| 47 69 76 65 20 76 61 72 | 69 6f 75 73 20 76 61 72 |Give var|ious var|
|00001190| 69 61 62 6c 65 73 20 76 | 61 6c 75 65 73 20 61 70 |iables v|alues ap|
|000011a0| 70 72 6f 70 72 69 61 74 | 65 20 66 6f 72 20 4c 61 |propriat|e for La|
|000011b0| 54 65 58 20 6d 6f 64 65 | 22 0d 20 20 20 28 69 6e |TeX mode|". (in|
|000011c0| 74 65 72 61 63 74 69 76 | 65 29 0d 20 20 20 28 74 |teractiv|e). (t|
|000011d0| 65 78 2d 63 6f 6d 6d 6f | 6e 2d 69 6e 69 74 69 61 |ex-commo|n-initia|
|000011e0| 6c 69 7a 61 74 69 6f 6e | 29 0d 20 20 20 28 73 65 |lization|). (se|
|000011f0| 74 71 20 74 65 78 2d 63 | 6f 6d 6d 61 6e 64 20 6c |tq tex-c|ommand l|
|00001200| 61 74 65 78 2d 72 75 6e | 2d 63 6f 6d 6d 61 6e 64 |atex-run|-command|
|00001210| 29 0d 20 20 20 28 73 65 | 74 71 20 74 65 78 2d 73 |). (se|tq tex-s|
|00001220| 74 61 72 74 2d 6f 66 2d | 68 65 61 64 65 72 20 22 |tart-of-|header "|
|00001230| 5c 5c 64 6f 63 75 6d 65 | 6e 74 73 74 79 6c 65 22 |\\docume|ntstyle"|
|00001240| 29 0d 20 20 20 28 73 65 | 74 71 20 74 65 78 2d 65 |). (se|tq tex-e|
|00001250| 6e 64 2d 6f 66 2d 68 65 | 61 64 65 72 20 22 5c 5c |nd-of-he|ader "\\|
|00001260| 62 65 67 69 6e 20 7b 64 | 6f 63 75 6d 65 6e 74 7d |begin {d|ocument}|
|00001270| 22 29 0d 20 20 20 28 73 | 65 74 71 20 74 65 78 2d |"). (s|etq tex-|
|00001280| 74 72 61 69 6c 65 72 20 | 22 5c 5c 65 6e 64 20 7b |trailer |"\\end {|
|00001290| 64 6f 63 75 6d 65 6e 74 | 7d 5c 6e 22 29 0d 29 0d |document|}\n").).|
|000012a0| 0d 0d 28 64 65 66 75 6e | 20 74 65 78 2d 63 6f 6d |..(defun| tex-com|
|000012b0| 6d 6f 6e 2d 69 6e 69 74 | 69 61 6c 69 7a 61 74 69 |mon-init|ializati|
|000012c0| 6f 6e 20 28 29 0d 20 20 | 28 6d 61 6b 65 2d 6c 6f |on (). |(make-lo|
|000012d0| 63 61 6c 2d 76 61 72 69 | 61 62 6c 65 20 27 74 65 |cal-vari|able 'te|
|000012e0| 78 2d 63 6f 6d 6d 61 6e | 64 29 0d 20 20 28 6d 61 |x-comman|d). (ma|
|000012f0| 6b 65 2d 6c 6f 63 61 6c | 2d 76 61 72 69 61 62 6c |ke-local|-variabl|
|00001300| 65 20 27 74 65 78 2d 73 | 74 61 72 74 2d 6f 66 2d |e 'tex-s|tart-of-|
|00001310| 68 65 61 64 65 72 29 0d | 20 20 28 6d 61 6b 65 2d |header).| (make-|
|00001320| 6c 6f 63 61 6c 2d 76 61 | 72 69 61 62 6c 65 20 27 |local-va|riable '|
|00001330| 74 65 78 2d 65 6e 64 2d | 6f 66 2d 68 65 61 64 65 |tex-end-|of-heade|
|00001340| 72 29 0d 20 20 28 6d 61 | 6b 65 2d 6c 6f 63 61 6c |r). (ma|ke-local|
|00001350| 2d 76 61 72 69 61 62 6c | 65 20 27 74 65 78 2d 74 |-variabl|e 'tex-t|
|00001360| 72 61 69 6c 65 72 29 29 | 0d 0d 0c 0d 3b 3b 3b 20 |railer))|....;;; |
|00001370| 49 6e 76 6f 6b 69 6e 67 | 20 54 65 58 20 69 6e 20 |Invoking| TeX in |
|00001380| 61 6e 20 69 6e 66 65 72 | 69 6f 72 20 73 68 65 6c |an infer|ior shel|
|00001390| 6c 2e 0d 0d 3b 3b 3b 20 | 57 68 79 20 75 73 65 20 |l...;;; |Why use |
|000013a0| 61 20 73 68 65 6c 6c 20 | 69 6e 73 74 65 61 64 20 |a shell |instead |
|000013b0| 6f 66 20 72 75 6e 6e 69 | 6e 67 20 54 65 58 20 64 |of runni|ng TeX d|
|000013c0| 69 72 65 63 74 6c 79 3f | 20 20 42 65 63 61 75 73 |irectly?| Becaus|
|000013d0| 65 20 69 66 20 54 65 58 | 0d 3b 3b 3b 20 67 65 74 |e if TeX|.;;; get|
|000013e0| 73 20 73 74 75 63 6b 2c | 20 74 68 65 20 75 73 65 |s stuck,| the use|
|000013f0| 72 20 63 61 6e 20 73 77 | 69 74 63 68 20 74 6f 20 |r can sw|itch to |
|00001400| 74 68 65 20 73 68 65 6c | 6c 20 77 69 6e 64 6f 77 |the shel|l window|
|00001410| 20 61 6e 64 20 74 79 70 | 65 20 61 74 20 69 74 2e | and typ|e at it.|
|00001420| 0d 0d 3b 3b 3b 20 54 68 | 65 20 75 74 69 6c 69 74 |..;;; Th|e utilit|
|00001430| 79 20 66 75 6e 63 74 69 | 6f 6e 73 3a 0d 0d 28 64 |y functi|ons:..(d|
|00001440| 65 66 75 6e 20 74 65 78 | 2d 73 74 61 72 74 2d 73 |efun tex|-start-s|
|00001450| 68 65 6c 6c 20 28 29 0d | 20 20 28 73 61 76 65 2d |hell ().| (save-|
|00001460| 65 78 63 75 72 73 69 6f | 6e 0d 20 20 20 20 28 73 |excursio|n. (s|
|00001470| 65 74 2d 62 75 66 66 65 | 72 0d 20 20 20 20 20 28 |et-buffe|r. (|
|00001480| 6d 61 6b 65 2d 63 6f 6d | 69 6e 74 0d 20 20 20 20 |make-com|int. |
|00001490| 20 20 22 74 65 78 2d 73 | 68 65 6c 6c 22 0d 20 20 | "tex-s|hell". |
|000014a0| 20 20 20 20 28 6f 72 20 | 74 65 78 2d 73 68 65 6c | (or |tex-shel|
|000014b0| 6c 2d 66 69 6c 65 2d 6e | 61 6d 65 20 28 67 65 74 |l-file-n|ame (get|
|000014c0| 65 6e 76 20 22 45 53 48 | 45 4c 4c 22 29 20 28 67 |env "ESH|ELL") (g|
|000014d0| 65 74 65 6e 76 20 22 53 | 48 45 4c 4c 22 29 20 22 |etenv "S|HELL") "|
|000014e0| 2f 62 69 6e 2f 73 68 22 | 29 29 29 0d 20 20 20 20 |/bin/sh"|))). |
|000014f0| 28 6c 65 74 20 28 28 70 | 72 6f 63 20 28 67 65 74 |(let ((p|roc (get|
|00001500| 2d 70 72 6f 63 65 73 73 | 20 22 74 65 78 2d 73 68 |-process| "tex-sh|
|00001510| 65 6c 6c 22 29 29 29 0d | 20 20 20 20 20 20 28 73 |ell"))).| (s|
|00001520| 65 74 2d 70 72 6f 63 65 | 73 73 2d 73 65 6e 74 69 |et-proce|ss-senti|
|00001530| 6e 65 6c 20 70 72 6f 63 | 20 27 74 65 78 2d 73 68 |nel proc| 'tex-sh|
|00001540| 65 6c 6c 2d 73 65 6e 74 | 69 6e 65 6c 29 0d 20 20 |ell-sent|inel). |
|00001550| 20 20 20 20 28 70 72 6f | 63 65 73 73 2d 6b 69 6c | (pro|cess-kil|
|00001560| 6c 2d 77 69 74 68 6f 75 | 74 2d 71 75 65 72 79 20 |l-withou|t-query |
|00001570| 70 72 6f 63 29 0d 20 20 | 20 20 20 20 28 73 65 74 |proc). | (set|
|00001580| 71 20 74 65 78 2d 73 68 | 65 6c 6c 2d 6d 61 70 20 |q tex-sh|ell-map |
|00001590| 28 63 6f 70 79 2d 6b 65 | 79 6d 61 70 20 63 6f 6d |(copy-ke|ymap com|
|000015a0| 69 6e 74 2d 6d 6f 64 65 | 2d 6d 61 70 29 29 0d 20 |int-mode|-map)). |
|000015b0| 20 20 20 20 20 28 77 68 | 69 6c 65 20 28 7a 65 72 | (wh|ile (zer|
|000015c0| 6f 70 20 28 62 75 66 66 | 65 72 2d 73 69 7a 65 29 |op (buff|er-size)|
|000015d0| 29 0d 20 20 20 20 20 20 | 20 20 20 20 28 73 6c 65 |). | (sle|
|000015e0| 65 70 2d 66 6f 72 20 31 | 29 29 29 29 29 0d 0d 28 |ep-for 1|)))))..(|
|000015f0| 64 65 66 75 6e 20 74 65 | 78 2d 73 68 65 6c 6c 2d |defun te|x-shell-|
|00001600| 73 65 6e 74 69 6e 65 6c | 20 28 70 72 6f 63 20 6d |sentinel| (proc m|
|00001610| 73 67 29 0d 20 20 28 63 | 6f 6e 64 20 28 28 6e 75 |sg). (c|ond ((nu|
|00001620| 6c 6c 20 28 62 75 66 66 | 65 72 2d 6e 61 6d 65 20 |ll (buff|er-name |
|00001630| 28 70 72 6f 63 65 73 73 | 2d 62 75 66 66 65 72 20 |(process|-buffer |
|00001640| 70 72 6f 63 29 29 29 0d | 09 20 3b 3b 20 62 75 66 |proc))).|. ;; buf|
|00001650| 66 65 72 20 6b 69 6c 6c | 65 64 0d 09 20 28 73 65 |fer kill|ed.. (se|
|00001660| 74 2d 70 72 6f 63 65 73 | 73 2d 62 75 66 66 65 72 |t-proces|s-buffer|
|00001670| 20 70 72 6f 63 20 6e 69 | 6c 29 0d 20 20 20 20 20 | proc ni|l). |
|00001680| 20 20 20 20 28 74 65 78 | 2d 64 65 6c 65 74 65 2d | (tex|-delete-|
|00001690| 6c 61 73 74 2d 74 65 6d | 70 2d 66 69 6c 65 73 29 |last-tem|p-files)|
|000016a0| 29 0d 09 28 28 6d 65 6d | 71 20 28 70 72 6f 63 65 |)..((mem|q (proce|
|000016b0| 73 73 2d 73 74 61 74 75 | 73 20 70 72 6f 63 29 20 |ss-statu|s proc) |
|000016c0| 27 28 73 69 67 6e 61 6c | 20 65 78 69 74 29 29 0d |'(signal| exit)).|
|000016d0| 20 20 20 20 20 20 20 20 | 20 28 74 65 78 2d 64 65 | | (tex-de|
|000016e0| 6c 65 74 65 2d 6c 61 73 | 74 2d 74 65 6d 70 2d 66 |lete-las|t-temp-f|
|000016f0| 69 6c 65 73 29 29 29 29 | 0d 0d 28 64 65 66 75 6e |iles))))|..(defun|
|00001700| 20 74 65 78 2d 73 65 74 | 2d 62 75 66 66 65 72 2d | tex-set|-buffer-|
|00001710| 64 69 72 65 63 74 6f 72 | 79 20 28 62 75 66 66 65 |director|y (buffe|
|00001720| 72 20 64 69 72 65 63 74 | 6f 72 79 29 0d 20 20 22 |r direct|ory). "|
|00001730| 53 65 74 20 42 55 46 46 | 45 52 27 73 20 64 65 66 |Set BUFF|ER's def|
|00001740| 61 75 6c 74 20 64 69 72 | 65 63 74 6f 72 79 20 74 |ault dir|ectory t|
|00001750| 6f 20 62 65 20 44 49 52 | 45 43 54 4f 52 59 2e 22 |o be DIR|ECTORY."|
|00001760| 0d 20 20 28 73 65 74 71 | 20 64 69 72 65 63 74 6f |. (setq| directo|
|00001770| 72 79 20 28 66 69 6c 65 | 2d 6e 61 6d 65 2d 61 73 |ry (file|-name-as|
|00001780| 2d 64 69 72 65 63 74 6f | 72 79 20 28 65 78 70 61 |-directo|ry (expa|
|00001790| 6e 64 2d 66 69 6c 65 2d | 6e 61 6d 65 20 64 69 72 |nd-file-|name dir|
|000017a0| 65 63 74 6f 72 79 29 29 | 29 0d 20 20 28 69 66 20 |ectory))|). (if |
|000017b0| 28 6e 6f 74 20 28 66 69 | 6c 65 2d 64 69 72 65 63 |(not (fi|le-direc|
|000017c0| 74 6f 72 79 2d 70 20 64 | 69 72 65 63 74 6f 72 79 |tory-p d|irectory|
|000017d0| 29 29 0d 20 20 20 20 20 | 20 28 65 72 72 6f 72 20 |)). | (error |
|000017e0| 22 25 73 20 69 73 20 6e | 6f 74 20 61 20 64 69 72 |"%s is n|ot a dir|
|000017f0| 65 63 74 6f 72 79 22 20 | 64 69 72 65 63 74 6f 72 |ectory" |director|
|00001800| 79 29 0d 20 20 20 20 28 | 73 61 76 65 2d 65 78 63 |y). (|save-exc|
|00001810| 75 72 73 69 6f 6e 0d 20 | 20 20 20 20 20 28 73 65 |ursion. | (se|
|00001820| 74 2d 62 75 66 66 65 72 | 20 62 75 66 66 65 72 29 |t-buffer| buffer)|
|00001830| 0d 20 20 20 20 20 20 28 | 73 65 74 71 20 64 65 66 |. (|setq def|
|00001840| 61 75 6c 74 2d 64 69 72 | 65 63 74 6f 72 79 20 64 |ault-dir|ectory d|
|00001850| 69 72 65 63 74 6f 72 79 | 29 29 29 29 0d 0d 28 64 |irectory|))))..(d|
|00001860| 65 66 75 6e 20 74 65 78 | 2d 73 65 6e 64 2d 63 6f |efun tex|-send-co|
|00001870| 6d 6d 61 6e 64 20 28 63 | 6f 6d 6d 61 6e 64 20 26 |mmand (c|ommand &|
|00001880| 6f 70 74 69 6f 6e 61 6c | 20 66 69 6c 65 20 62 61 |optional| file ba|
|00001890| 63 6b 67 72 6f 75 6e 64 | 29 0d 20 20 22 53 65 6e |ckground|). "Sen|
|000018a0| 64 20 43 4f 4d 4d 41 4e | 44 20 74 6f 20 74 65 78 |d COMMAN|D to tex|
|000018b0| 2d 73 68 65 6c 6c 2c 20 | 73 75 62 73 74 69 74 75 |-shell, |substitu|
|000018c0| 74 69 6e 67 20 6f 70 74 | 69 6f 6e 61 6c 20 46 49 |ting opt|ional FI|
|000018d0| 4c 45 20 66 6f 72 20 2a | 3b 20 69 6e 20 62 61 63 |LE for *|; in bac|
|000018e0| 6b 67 72 6f 75 6e 64 0d | 69 66 20 6f 70 74 69 6f |kground.|if optio|
|000018f0| 6e 61 6c 20 42 41 43 4b | 47 52 4f 55 4e 44 20 69 |nal BACK|GROUND i|
|00001900| 73 20 74 2e 20 20 20 49 | 66 20 43 4f 4d 4d 41 4e |s t. I|f COMMAN|
|00001910| 44 20 68 61 73 20 6e 6f | 20 2a 2c 20 46 49 4c 45 |D has no| *, FILE|
|00001920| 20 77 69 6c 6c 20 62 65 | 20 61 70 70 65 6e 64 65 | will be| appende|
|00001930| 64 2c 0d 70 72 65 63 65 | 64 65 64 20 62 79 20 61 |d,.prece|ded by a|
|00001940| 20 62 6c 61 6e 6b 2c 20 | 74 6f 20 43 4f 4d 4d 41 | blank, |to COMMA|
|00001950| 4e 44 2e 20 20 49 66 20 | 46 49 4c 45 20 69 73 20 |ND. If |FILE is |
|00001960| 6e 69 6c 2c 20 6e 6f 20 | 73 75 62 73 74 69 74 75 |nil, no |substitu|
|00001970| 74 69 6f 6e 20 77 69 6c | 6c 20 62 65 20 6d 61 64 |tion wil|l be mad|
|00001980| 65 0d 69 6e 20 43 4f 4d | 4d 41 4e 44 2e 20 20 43 |e.in COM|MAND. C|
|00001990| 4f 4d 4d 41 4e 44 20 63 | 61 6e 20 62 65 20 61 6e |OMMAND c|an be an|
|000019a0| 79 20 65 78 70 72 65 73 | 73 69 6f 6e 20 74 68 61 |y expres|sion tha|
|000019b0| 74 20 65 76 61 6c 75 61 | 74 65 73 20 74 6f 20 61 |t evalua|tes to a|
|000019c0| 20 63 6f 6d 6d 61 6e 64 | 20 73 74 72 69 6e 67 2e | command| string.|
|000019d0| 22 0d 20 20 28 73 61 76 | 65 2d 65 78 63 75 72 73 |". (sav|e-excurs|
|000019e0| 69 6f 6e 0d 20 20 20 20 | 28 6c 65 74 2a 20 28 28 |ion. |(let* ((|
|000019f0| 63 6d 64 20 28 65 76 61 | 6c 20 63 6f 6d 6d 61 6e |cmd (eva|l comman|
|00001a00| 64 29 29 0d 20 20 20 20 | 20 20 20 20 20 20 20 28 |d)). | (|
|00001a10| 73 74 61 72 20 28 73 74 | 72 69 6e 67 2d 6d 61 74 |star (st|ring-mat|
|00001a20| 63 68 20 22 5c 5c 2a 22 | 20 63 6d 64 29 29 29 0d |ch "\\*"| cmd))).|
|00001a30| 20 20 20 20 20 20 28 63 | 6f 6d 69 6e 74 2d 70 72 | (c|omint-pr|
|00001a40| 6f 63 2d 71 75 65 72 79 | 20 28 67 65 74 2d 70 72 |oc-query| (get-pr|
|00001a50| 6f 63 65 73 73 20 22 74 | 65 78 2d 73 68 65 6c 6c |ocess "t|ex-shell|
|00001a60| 22 29 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |"). | |
|00001a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 63 6f 6e | | (con|
|00001a80| 63 61 74 20 28 73 75 62 | 73 74 72 69 6e 67 20 63 |cat (sub|string c|
|00001a90| 6d 64 20 30 20 73 74 61 | 72 29 0d 20 20 20 20 20 |md 0 sta|r). |
|00001aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 69 66 20 | | (if |
|00001ac0| 66 69 6c 65 20 28 63 6f | 6e 63 61 74 20 22 20 22 |file (co|ncat " "|
|00001ad0| 20 66 69 6c 65 29 20 22 | 22 29 0d 20 20 20 20 20 | file) "|"). |
|00001ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 69 66 20 | | (if |
|00001b00| 73 74 61 72 20 28 73 75 | 62 73 74 72 69 6e 67 20 |star (su|bstring |
|00001b10| 63 6d 64 20 28 31 2b 20 | 73 74 61 72 29 20 6e 69 |cmd (1+ |star) ni|
|00001b20| 6c 29 20 22 22 29 0d 20 | 20 20 20 20 20 20 20 20 |l) ""). | |
|00001b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001b40| 20 20 20 20 20 20 20 20 | 28 69 66 20 62 61 63 6b | |(if back|
|00001b50| 67 72 6f 75 6e 64 20 22 | 26 5c 6e 22 20 22 5c 6e |ground "|&\n" "\n|
|00001b60| 22 29 29 29 29 29 29 0d | 0d 0d 28 64 65 66 75 6e |")))))).|..(defun|
|00001b70| 20 74 65 78 2d 64 65 6c | 65 74 65 2d 6c 61 73 74 | tex-del|ete-last|
|00001b80| 2d 74 65 6d 70 2d 66 69 | 6c 65 73 20 28 29 0d 20 |-temp-fi|les (). |
|00001b90| 20 22 44 65 6c 65 74 65 | 20 61 6e 79 20 6a 75 6e | "Delete| any jun|
|00001ba0| 6b 20 66 69 6c 65 73 20 | 66 72 6f 6d 20 6c 61 73 |k files |from las|
|00001bb0| 74 20 74 65 6d 70 20 66 | 69 6c 65 2e 22 0d 20 20 |t temp f|ile.". |
|00001bc0| 28 69 6e 74 65 72 61 63 | 74 69 76 65 29 0d 20 20 |(interac|tive). |
|00001bd0| 28 69 66 20 74 65 78 2d | 6c 61 73 74 2d 74 65 6d |(if tex-|last-tem|
|00001be0| 70 2d 66 69 6c 65 0d 20 | 20 20 20 20 20 28 6c 65 |p-file. | (le|
|00001bf0| 74 2a 20 28 28 64 69 72 | 20 28 66 69 6c 65 2d 6e |t* ((dir| (file-n|
|00001c00| 61 6d 65 2d 64 69 72 65 | 63 74 6f 72 79 20 74 65 |ame-dire|ctory te|
|00001c10| 78 2d 6c 61 73 74 2d 74 | 65 6d 70 2d 66 69 6c 65 |x-last-t|emp-file|
|00001c20| 29 29 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)). | |
|00001c30| 28 6c 69 73 74 20 28 66 | 69 6c 65 2d 6e 61 6d 65 |(list (f|ile-name|
|00001c40| 2d 61 6c 6c 2d 63 6f 6d | 70 6c 65 74 69 6f 6e 73 |-all-com|pletions|
|00001c50| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001c60| 20 20 20 20 20 28 66 69 | 6c 65 2d 6e 61 6d 65 2d | (fi|le-name-|
|00001c70| 6e 6f 6e 64 69 72 65 63 | 74 6f 72 79 20 74 65 78 |nondirec|tory tex|
|00001c80| 2d 6c 61 73 74 2d 74 65 | 6d 70 2d 66 69 6c 65 29 |-last-te|mp-file)|
|00001c90| 20 64 69 72 29 29 29 0d | 20 20 20 20 20 20 20 20 | dir))).| |
|00001ca0| 28 77 68 69 6c 65 20 6c | 69 73 74 0d 20 20 20 20 |(while l|ist. |
|00001cb0| 20 20 20 20 20 20 28 64 | 65 6c 65 74 65 2d 66 69 | (d|elete-fi|
|00001cc0| 6c 65 20 28 63 6f 6e 63 | 61 74 20 64 69 72 20 28 |le (conc|at dir (|
|00001cd0| 63 61 72 20 6c 69 73 74 | 29 29 29 0d 20 20 20 20 |car list|))). |
|00001ce0| 20 20 20 20 20 20 28 73 | 65 74 71 20 6c 69 73 74 | (s|etq list|
|00001cf0| 20 28 63 64 72 20 6c 69 | 73 74 29 29 29 29 29 29 | (cdr li|st))))))|
|00001d00| 0d 0d 28 73 65 74 71 20 | 6b 69 6c 6c 2d 65 6d 61 |..(setq |kill-ema|
|00001d10| 63 73 2d 68 6f 6f 6b 20 | 27 74 65 78 2d 64 65 6c |cs-hook |'tex-del|
|00001d20| 65 74 65 2d 6c 61 73 74 | 2d 74 65 6d 70 2d 66 69 |ete-last|-temp-fi|
|00001d30| 6c 65 73 29 0d 0d 3b 3b | 3b 20 54 68 65 20 63 6f |les)..;;|; The co|
|00001d40| 6d 6d 61 6e 64 73 3a 0d | 0d 28 64 65 66 75 6e 20 |mmands:.|.(defun |
|00001d50| 74 65 78 2d 72 65 67 69 | 6f 6e 20 28 62 65 67 20 |tex-regi|on (beg |
|00001d60| 65 6e 64 29 0d 20 20 22 | 52 75 6e 20 54 65 58 20 |end). "|Run TeX |
|00001d70| 6f 6e 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 72 |on the c|urrent r|
|00001d80| 65 67 69 6f 6e 2c 20 76 | 69 61 20 61 20 74 65 6d |egion, v|ia a tem|
|00001d90| 70 6f 72 61 72 79 20 66 | 69 6c 65 2e 0d 54 68 65 |porary f|ile..The|
|00001da0| 20 66 69 6c 65 27 73 20 | 6e 61 6d 65 20 63 6f 6d | file's |name com|
|00001db0| 65 73 20 66 72 6f 6d 20 | 74 68 65 20 76 61 72 69 |es from |the vari|
|00001dc0| 61 62 6c 65 20 60 74 65 | 78 2d 7a 61 70 2d 66 69 |able `te|x-zap-fi|
|00001dd0| 6c 65 27 20 61 6e 64 20 | 74 68 65 0d 76 61 72 69 |le' and |the.vari|
|00001de0| 61 62 6c 65 20 60 74 65 | 78 2d 64 69 72 65 63 74 |able `te|x-direct|
|00001df0| 6f 72 79 27 20 73 61 79 | 73 20 77 68 65 72 65 20 |ory' say|s where |
|00001e00| 74 6f 20 70 75 74 20 69 | 74 2e 0d 0d 49 66 20 74 |to put i|t...If t|
|00001e10| 68 65 20 62 75 66 66 65 | 72 20 68 61 73 20 61 20 |he buffe|r has a |
|00001e20| 68 65 61 64 65 72 2c 20 | 74 68 65 20 68 65 61 64 |header, |the head|
|00001e30| 65 72 20 69 73 20 67 69 | 76 65 6e 20 74 6f 20 54 |er is gi|ven to T|
|00001e40| 65 58 20 62 65 66 6f 72 | 65 20 74 68 65 0d 72 65 |eX befor|e the.re|
|00001e50| 67 69 6f 6e 20 69 74 73 | 65 6c 66 2e 20 20 54 68 |gion its|elf. Th|
|00001e60| 65 20 62 75 66 66 65 72 | 27 73 20 68 65 61 64 65 |e buffer|'s heade|
|00001e70| 72 20 69 73 20 61 6c 6c | 20 6c 69 6e 65 73 20 62 |r is all| lines b|
|00001e80| 65 74 77 65 65 6e 20 74 | 68 65 20 73 74 72 69 6e |etween t|he strin|
|00001e90| 67 73 0d 64 65 66 69 6e | 65 64 20 62 79 20 60 74 |gs.defin|ed by `t|
|00001ea0| 65 78 2d 73 74 61 72 74 | 2d 6f 66 2d 68 65 61 64 |ex-start|-of-head|
|00001eb0| 65 72 27 20 61 6e 64 20 | 60 74 65 78 2d 65 6e 64 |er' and |`tex-end|
|00001ec0| 2d 6f 66 2d 68 65 61 64 | 65 72 27 20 69 6e 63 6c |-of-head|er' incl|
|00001ed0| 75 73 69 76 65 2e 0d 54 | 68 65 20 68 65 61 64 65 |usive..T|he heade|
|00001ee0| 72 20 6d 75 73 74 20 73 | 74 61 72 74 20 69 6e 20 |r must s|tart in |
|00001ef0| 74 68 65 20 66 69 72 73 | 74 20 31 30 30 20 6c 69 |the firs|t 100 li|
|00001f00| 6e 65 73 20 6f 66 20 74 | 68 65 20 62 75 66 66 65 |nes of t|he buffe|
|00001f10| 72 2e 0d 0d 54 68 65 20 | 76 61 6c 75 65 20 6f 66 |r...The |value of|
|00001f20| 20 60 74 65 78 2d 74 72 | 61 69 6c 65 72 27 20 69 | `tex-tr|ailer' i|
|00001f30| 73 20 67 69 76 65 6e 20 | 74 6f 20 54 65 58 20 61 |s given |to TeX a|
|00001f40| 73 20 69 6e 70 75 74 20 | 61 66 74 65 72 20 74 68 |s input |after th|
|00001f50| 65 20 72 65 67 69 6f 6e | 2e 0d 0d 54 68 65 20 76 |e region|...The v|
|00001f60| 61 6c 75 65 20 6f 66 20 | 60 74 65 78 2d 63 6f 6d |alue of |`tex-com|
|00001f70| 6d 61 6e 64 27 20 73 70 | 65 63 69 66 69 65 73 20 |mand' sp|ecifies |
|00001f80| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 74 6f 20 75 |the comm|and to u|
|00001f90| 73 65 20 74 6f 20 72 75 | 6e 20 54 65 58 2e 22 0d |se to ru|n TeX.".|
|00001fa0| 20 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 | (inter|active "|
|00001fb0| 72 22 29 0d 20 20 28 69 | 66 20 28 74 65 78 2d 73 |r"). (i|f (tex-s|
|00001fc0| 68 65 6c 6c 2d 72 75 6e | 6e 69 6e 67 29 0d 20 20 |hell-run|ning). |
|00001fd0| 20 20 20 20 28 74 65 78 | 2d 6b 69 6c 6c 2d 6a 6f | (tex|-kill-jo|
|00001fe0| 62 29 0d 20 20 20 20 28 | 74 65 78 2d 73 74 61 72 |b). (|tex-star|
|00001ff0| 74 2d 73 68 65 6c 6c 29 | 29 0d 20 20 28 6f 72 20 |t-shell)|). (or |
|00002000| 74 65 78 2d 7a 61 70 2d | 66 69 6c 65 0d 20 20 20 |tex-zap-|file. |
|00002010| 20 20 20 28 73 65 74 71 | 20 74 65 78 2d 7a 61 70 | (setq| tex-zap|
|00002020| 2d 66 69 6c 65 20 28 74 | 65 78 2d 67 65 6e 65 72 |-file (t|ex-gener|
|00002030| 61 74 65 2d 7a 61 70 2d | 66 69 6c 65 2d 6e 61 6d |ate-zap-|file-nam|
|00002040| 65 29 29 29 0d 20 20 28 | 6c 65 74 2a 20 28 28 74 |e))). (|let* ((t|
|00002050| 65 6d 70 2d 62 75 66 66 | 65 72 20 28 67 65 74 2d |emp-buff|er (get-|
|00002060| 62 75 66 66 65 72 2d 63 | 72 65 61 74 65 20 22 20 |buffer-c|reate " |
|00002070| 54 65 58 2d 4f 75 74 70 | 75 74 2d 42 75 66 66 65 |TeX-Outp|ut-Buffe|
|00002080| 72 22 29 29 0d 20 20 20 | 20 20 20 20 20 20 3b 20 |r")). | ; |
|00002090| 54 65 6d 70 20 66 69 6c | 65 20 77 69 6c 6c 20 62 |Temp fil|e will b|
|000020a0| 65 20 77 72 69 74 74 65 | 6e 20 61 6e 64 20 54 65 |e writte|n and Te|
|000020b0| 58 20 77 69 6c 6c 20 62 | 65 20 72 75 6e 20 69 6e |X will b|e run in|
|000020c0| 20 7a 61 70 2d 64 69 72 | 65 63 74 6f 72 79 2e 0d | zap-dir|ectory..|
|000020d0| 20 20 20 20 20 20 20 20 | 20 3b 20 49 66 20 74 68 | | ; If th|
|000020e0| 65 20 54 45 58 49 4e 50 | 55 54 53 20 66 69 6c 65 |e TEXINP|UTS file|
|000020f0| 20 68 61 73 20 72 65 6c | 61 74 69 76 65 20 64 69 | has rel|ative di|
|00002100| 72 65 63 74 6f 72 69 65 | 73 20 6f 72 20 69 66 20 |rectorie|s or if |
|00002110| 74 68 65 20 72 65 67 69 | 6f 6e 20 68 61 73 0d 20 |the regi|on has. |
|00002120| 20 20 20 20 20 20 20 20 | 3b 20 5c 69 6e 70 75 74 | |; \input|
|00002130| 20 6f 66 20 66 69 6c 65 | 73 2c 20 74 68 69 73 20 | of file|s, this |
|00002140| 6d 75 73 74 20 62 65 20 | 74 68 65 20 73 61 6d 65 |must be |the same|
|00002150| 20 64 69 72 65 63 74 6f | 72 79 20 61 73 20 74 68 | directo|ry as th|
|00002160| 65 20 66 69 6c 65 20 66 | 6f 72 0d 20 20 20 20 20 |e file f|or. |
|00002170| 20 20 20 20 3b 20 54 65 | 58 20 74 6f 20 61 63 63 | ; Te|X to acc|
|00002180| 65 73 73 20 74 68 65 20 | 63 6f 72 72 65 63 74 20 |ess the |correct |
|00002190| 69 6e 70 75 74 73 2e 20 | 20 54 68 61 74 27 73 20 |inputs. | That's |
|000021a0| 77 68 79 20 69 74 27 73 | 20 73 61 66 65 73 74 20 |why it's| safest |
|000021b0| 69 66 0d 20 20 20 20 20 | 20 20 20 20 3b 20 74 65 |if. | ; te|
|000021c0| 78 2d 64 69 72 65 63 74 | 6f 72 79 20 69 73 20 22 |x-direct|ory is "|
|000021d0| 2e 22 2e 0d 20 20 20 20 | 20 20 20 20 20 28 7a 61 |.".. | (za|
|000021e0| 70 2d 64 69 72 65 63 74 | 6f 72 79 0d 20 20 20 20 |p-direct|ory. |
|000021f0| 20 20 20 20 20 20 28 66 | 69 6c 65 2d 6e 61 6d 65 | (f|ile-name|
|00002200| 2d 61 73 2d 64 69 72 65 | 63 74 6f 72 79 20 28 65 |-as-dire|ctory (e|
|00002210| 78 70 61 6e 64 2d 66 69 | 6c 65 2d 6e 61 6d 65 20 |xpand-fi|le-name |
|00002220| 74 65 78 2d 64 69 72 65 | 63 74 6f 72 79 29 29 29 |tex-dire|ctory)))|
|00002230| 0d 20 20 20 20 20 20 20 | 20 20 28 74 65 78 2d 6f |. | (tex-o|
|00002240| 75 74 2d 66 69 6c 65 20 | 28 63 6f 6e 63 61 74 20 |ut-file |(concat |
|00002250| 7a 61 70 2d 64 69 72 65 | 63 74 6f 72 79 20 74 65 |zap-dire|ctory te|
|00002260| 78 2d 7a 61 70 2d 66 69 | 6c 65 29 29 29 0d 20 20 |x-zap-fi|le))). |
|00002270| 20 20 28 74 65 78 2d 64 | 65 6c 65 74 65 2d 6c 61 | (tex-d|elete-la|
|00002280| 73 74 2d 74 65 6d 70 2d | 66 69 6c 65 73 29 0d 20 |st-temp-|files). |
|00002290| 20 20 20 3b 3b 20 57 72 | 69 74 65 20 74 68 65 20 | ;; Wr|ite the |
|000022a0| 6e 65 77 20 74 65 6d 70 | 20 66 69 6c 65 2e 0d 20 |new temp| file.. |
|000022b0| 20 20 20 28 73 61 76 65 | 2d 65 78 63 75 72 73 69 | (save|-excursi|
|000022c0| 6f 6e 0d 20 20 20 20 20 | 20 28 73 61 76 65 2d 72 |on. | (save-r|
|000022d0| 65 73 74 72 69 63 74 69 | 6f 6e 0d 09 28 77 69 64 |estricti|on..(wid|
|000022e0| 65 6e 29 0d 09 28 67 6f | 74 6f 2d 63 68 61 72 20 |en)..(go|to-char |
|000022f0| 28 70 6f 69 6e 74 2d 6d | 69 6e 29 29 0d 09 28 66 |(point-m|in))..(f|
|00002300| 6f 72 77 61 72 64 2d 6c | 69 6e 65 20 31 30 30 29 |orward-l|ine 100)|
|00002310| 0d 09 28 6c 65 74 20 28 | 28 73 65 61 72 63 68 2d |..(let (|(search-|
|00002320| 65 6e 64 20 28 70 6f 69 | 6e 74 29 29 0d 09 20 20 |end (poi|nt)).. |
|00002330| 20 20 20 20 28 68 62 65 | 67 20 28 70 6f 69 6e 74 | (hbe|g (point|
|00002340| 2d 6d 69 6e 29 29 20 28 | 68 65 6e 64 20 28 70 6f |-min)) (|hend (po|
|00002350| 69 6e 74 2d 6d 69 6e 29 | 29 0d 09 20 20 20 20 20 |int-min)|).. |
|00002360| 20 28 64 65 66 61 75 6c | 74 2d 64 69 72 65 63 74 | (defaul|t-direct|
|00002370| 6f 72 79 20 7a 61 70 2d | 64 69 72 65 63 74 6f 72 |ory zap-|director|
|00002380| 79 29 29 0d 09 20 20 28 | 67 6f 74 6f 2d 63 68 61 |y)).. (|goto-cha|
|00002390| 72 20 28 70 6f 69 6e 74 | 2d 6d 69 6e 29 29 0d 09 |r (point|-min))..|
|000023a0| 20 20 3b 3b 20 49 6e 69 | 74 69 61 6c 69 7a 65 20 | ;; Ini|tialize |
|000023b0| 74 68 65 20 74 65 6d 70 | 20 66 69 6c 65 20 77 69 |the temp| file wi|
|000023c0| 74 68 20 65 69 74 68 65 | 72 20 74 68 65 20 68 65 |th eithe|r the he|
|000023d0| 61 64 65 72 20 6f 72 20 | 6e 6f 74 68 69 6e 67 0d |ader or |nothing.|
|000023e0| 09 20 20 28 69 66 20 28 | 73 65 61 72 63 68 2d 66 |. (if (|search-f|
|000023f0| 6f 72 77 61 72 64 20 74 | 65 78 2d 73 74 61 72 74 |orward t|ex-start|
|00002400| 2d 6f 66 2d 68 65 61 64 | 65 72 20 73 65 61 72 63 |-of-head|er searc|
|00002410| 68 2d 65 6e 64 20 74 29 | 0d 09 20 20 20 20 20 20 |h-end t)|.. |
|00002420| 28 70 72 6f 67 6e 0d 09 | 09 28 62 65 67 69 6e 6e |(progn..|.(beginn|
|00002430| 69 6e 67 2d 6f 66 2d 6c | 69 6e 65 29 0d 09 09 28 |ing-of-l|ine)...(|
|00002440| 73 65 74 71 20 68 62 65 | 67 20 28 70 6f 69 6e 74 |setq hbe|g (point|
|00002450| 29 29 09 3b 6d 61 72 6b | 20 62 65 67 69 6e 6e 69 |)).;mark| beginni|
|00002460| 6e 67 20 6f 66 20 68 65 | 61 64 65 72 0d 09 09 28 |ng of he|ader...(|
|00002470| 69 66 20 28 73 65 61 72 | 63 68 2d 66 6f 72 77 61 |if (sear|ch-forwa|
|00002480| 72 64 20 74 65 78 2d 65 | 6e 64 2d 6f 66 2d 68 65 |rd tex-e|nd-of-he|
|00002490| 61 64 65 72 20 6e 69 6c | 20 74 29 0d 09 09 20 20 |ader nil| t)... |
|000024a0| 20 20 28 70 72 6f 67 6e | 20 28 66 6f 72 77 61 72 | (progn| (forwar|
|000024b0| 64 2d 6c 69 6e 65 20 31 | 29 0d 09 09 09 20 20 20 |d-line 1|).... |
|000024c0| 28 73 65 74 71 20 68 65 | 6e 64 20 28 70 6f 69 6e |(setq he|nd (poin|
|000024d0| 74 29 29 29 09 3b 6d 61 | 72 6b 20 65 6e 64 20 6f |t))).;ma|rk end o|
|000024e0| 66 20 68 65 61 64 65 72 | 0d 09 09 20 20 28 73 65 |f header|... (se|
|000024f0| 74 71 20 68 62 65 67 20 | 28 70 6f 69 6e 74 2d 6d |tq hbeg |(point-m|
|00002500| 69 6e 29 29 29 29 29 20 | 3b 6e 6f 20 68 65 61 64 |in))))) |;no head|
|00002510| 65 72 0d 09 20 20 28 77 | 72 69 74 65 2d 72 65 67 |er.. (w|rite-reg|
|00002520| 69 6f 6e 20 28 6d 69 6e | 20 68 62 65 67 20 62 65 |ion (min| hbeg be|
|00002530| 67 29 20 68 65 6e 64 0d | 20 20 20 20 20 20 20 20 |g) hend.| |
|00002540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002550| 28 63 6f 6e 63 61 74 20 | 74 65 78 2d 6f 75 74 2d |(concat |tex-out-|
|00002560| 66 69 6c 65 20 22 2e 74 | 65 78 22 29 20 6e 69 6c |file ".t|ex") nil|
|00002570| 20 6e 69 6c 29 0d 09 20 | 20 28 77 72 69 74 65 2d | nil).. | (write-|
|00002580| 72 65 67 69 6f 6e 20 28 | 6d 61 78 20 62 65 67 20 |region (|max beg |
|00002590| 68 65 6e 64 29 20 65 6e | 64 20 28 63 6f 6e 63 61 |hend) en|d (conca|
|000025a0| 74 20 74 65 78 2d 6f 75 | 74 2d 66 69 6c 65 20 22 |t tex-ou|t-file "|
|000025b0| 2e 74 65 78 22 29 20 74 | 20 6e 69 6c 29 29 0d 09 |.tex") t| nil))..|
|000025c0| 28 6c 65 74 20 28 28 6c | 6f 63 61 6c 2d 74 65 78 |(let ((l|ocal-tex|
|000025d0| 2d 74 72 61 69 6c 65 72 | 20 74 65 78 2d 74 72 61 |-trailer| tex-tra|
|000025e0| 69 6c 65 72 29 29 0d 09 | 20 20 28 73 65 74 2d 62 |iler))..| (set-b|
|000025f0| 75 66 66 65 72 20 74 65 | 6d 70 2d 62 75 66 66 65 |uffer te|mp-buffe|
|00002600| 72 29 0d 09 20 20 28 65 | 72 61 73 65 2d 62 75 66 |r).. (e|rase-buf|
|00002610| 66 65 72 29 0d 09 20 20 | 3b 3b 20 6d 61 6b 65 20 |fer).. |;; make |
|00002620| 73 75 72 65 20 74 72 61 | 69 6c 65 72 20 69 73 6e |sure tra|iler isn|
|00002630| 27 74 20 68 69 64 64 65 | 6e 20 62 79 20 61 20 63 |'t hidde|n by a c|
|00002640| 6f 6d 6d 65 6e 74 0d 09 | 20 20 28 69 6e 73 65 72 |omment..| (inser|
|00002650| 74 20 22 5c 6e 22 29 0d | 09 20 20 28 69 66 20 6c |t "\n").|. (if l|
|00002660| 6f 63 61 6c 2d 74 65 78 | 2d 74 72 61 69 6c 65 72 |ocal-tex|-trailer|
|00002670| 20 28 69 6e 73 65 72 74 | 20 6c 6f 63 61 6c 2d 74 | (insert| local-t|
|00002680| 65 78 2d 74 72 61 69 6c | 65 72 29 29 0d 09 20 20 |ex-trail|er)).. |
|00002690| 28 74 65 78 2d 73 65 74 | 2d 62 75 66 66 65 72 2d |(tex-set|-buffer-|
|000026a0| 64 69 72 65 63 74 6f 72 | 79 20 74 65 6d 70 2d 62 |director|y temp-b|
|000026b0| 75 66 66 65 72 20 7a 61 | 70 2d 64 69 72 65 63 74 |uffer za|p-direct|
|000026c0| 6f 72 79 29 0d 09 20 20 | 28 77 72 69 74 65 2d 72 |ory).. |(write-r|
|000026d0| 65 67 69 6f 6e 20 28 70 | 6f 69 6e 74 2d 6d 69 6e |egion (p|oint-min|
|000026e0| 29 20 28 70 6f 69 6e 74 | 2d 6d 61 78 29 0d 20 20 |) (point|-max). |
|000026f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002700| 20 20 20 20 20 20 28 63 | 6f 6e 63 61 74 20 74 65 | (c|oncat te|
|00002710| 78 2d 6f 75 74 2d 66 69 | 6c 65 20 22 2e 74 65 78 |x-out-fi|le ".tex|
|00002720| 22 29 20 74 20 6e 69 6c | 29 29 29 29 0d 20 20 20 |") t nil|)))). |
|00002730| 20 3b 3b 20 52 65 63 6f | 72 64 20 74 68 65 20 66 | ;; Reco|rd the f|
|00002740| 69 6c 65 20 6e 61 6d 65 | 20 74 6f 20 62 65 20 64 |ile name| to be d|
|00002750| 65 6c 65 74 65 64 20 61 | 66 74 65 72 77 61 72 64 |eleted a|fterward|
|00002760| 2e 0d 20 20 20 20 28 73 | 65 74 71 20 74 65 78 2d |.. (s|etq tex-|
|00002770| 6c 61 73 74 2d 74 65 6d | 70 2d 66 69 6c 65 20 74 |last-tem|p-file t|
|00002780| 65 78 2d 6f 75 74 2d 66 | 69 6c 65 29 0d 20 20 20 |ex-out-f|ile). |
|00002790| 20 28 74 65 78 2d 73 65 | 6e 64 2d 63 6f 6d 6d 61 | (tex-se|nd-comma|
|000027a0| 6e 64 20 74 65 78 2d 73 | 68 65 6c 6c 2d 63 64 2d |nd tex-s|hell-cd-|
|000027b0| 63 6f 6d 6d 61 6e 64 20 | 7a 61 70 2d 64 69 72 65 |command |zap-dire|
|000027c0| 63 74 6f 72 79 29 0d 20 | 20 20 20 28 74 65 78 2d |ctory). | (tex-|
|000027d0| 73 65 6e 64 2d 63 6f 6d | 6d 61 6e 64 20 74 65 78 |send-com|mand tex|
|000027e0| 2d 63 6f 6d 6d 61 6e 64 | 20 74 65 78 2d 6f 75 74 |-command| tex-out|
|000027f0| 2d 66 69 6c 65 29 0d 20 | 20 20 20 28 70 6f 70 2d |-file). | (pop-|
|00002800| 74 6f 2d 62 75 66 66 65 | 72 20 22 2a 74 65 78 2d |to-buffe|r "*tex-|
|00002810| 73 68 65 6c 6c 2a 22 29 | 20 3b 20 41 64 64 65 64 |shell*")| ; Added|
|00002820| 20 62 79 20 4b 2e 4f 2e | 0d 20 20 20 20 28 67 6f | by K.O.|. (go|
|00002830| 74 6f 2d 63 68 61 72 20 | 28 70 6f 69 6e 74 2d 6d |to-char |(point-m|
|00002840| 61 78 29 29 20 3b 20 41 | 64 64 65 64 20 62 79 20 |ax)) ; A|dded by |
|00002850| 4b 2e 4f 2e 0d 20 20 20 | 20 28 73 65 74 71 20 74 |K.O.. | (setq t|
|00002860| 65 78 2d 70 72 69 6e 74 | 2d 66 69 6c 65 20 74 65 |ex-print|-file te|
|00002870| 78 2d 6f 75 74 2d 66 69 | 6c 65 29 0d 20 20 20 20 |x-out-fi|le). |
|00002880| 28 73 65 74 71 20 74 65 | 78 2d 6c 61 73 74 2d 62 |(setq te|x-last-b|
|00002890| 75 66 66 65 72 2d 74 65 | 78 65 64 20 28 63 75 72 |uffer-te|xed (cur|
|000028a0| 72 65 6e 74 2d 62 75 66 | 66 65 72 29 29 29 29 0d |rent-buf|fer)))).|
|000028b0| 0d 28 64 65 66 75 6e 20 | 74 65 78 2d 62 75 66 66 |.(defun |tex-buff|
|000028c0| 65 72 20 28 29 0d 20 20 | 22 52 75 6e 20 54 65 58 |er (). |"Run TeX|
|000028d0| 20 6f 6e 20 63 75 72 72 | 65 6e 74 20 62 75 66 66 | on curr|ent buff|
|000028e0| 65 72 2e 20 20 53 65 65 | 20 5c 5c 5b 74 65 78 2d |er. See| \\[tex-|
|000028f0| 72 65 67 69 6f 6e 5d 20 | 66 6f 72 20 6d 6f 72 65 |region] |for more|
|00002900| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 2e 0d 44 6f | informa|tion..Do|
|00002910| 65 73 20 6e 6f 74 20 73 | 61 76 65 20 74 68 65 20 |es not s|ave the |
|00002920| 62 75 66 66 65 72 2c 20 | 73 6f 20 69 74 27 73 20 |buffer, |so it's |
|00002930| 75 73 65 66 75 6c 20 66 | 6f 72 20 74 72 79 69 6e |useful f|or tryin|
|00002940| 67 20 65 78 70 65 72 69 | 6d 65 6e 74 61 6c 20 76 |g experi|mental v|
|00002950| 65 72 73 69 6f 6e 73 2e | 0d 53 65 65 20 5c 5c 5b |ersions.|.See \\[|
|00002960| 74 65 78 2d 66 69 6c 65 | 5d 20 66 6f 72 20 61 6e |tex-file|] for an|
|00002970| 20 61 6c 74 65 72 6e 61 | 74 69 76 65 2e 22 0d 20 | alterna|tive.". |
|00002980| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 29 0d 20 | (intera|ctive). |
|00002990| 20 28 74 65 78 2d 72 65 | 67 69 6f 6e 20 28 70 6f | (tex-re|gion (po|
|000029a0| 69 6e 74 2d 6d 69 6e 29 | 20 28 70 6f 69 6e 74 2d |int-min)| (point-|
|000029b0| 6d 61 78 29 29 29 0d 0d | 28 64 65 66 75 6e 20 74 |max)))..|(defun t|
|000029c0| 65 78 2d 66 69 6c 65 20 | 28 29 0d 20 20 22 52 75 |ex-file |(). "Ru|
|000029d0| 6e 20 54 65 58 20 28 6f | 72 20 4c 61 54 65 58 29 |n TeX (o|r LaTeX)|
|000029e0| 20 6f 6e 20 63 75 72 72 | 65 6e 74 20 62 75 66 66 | on curr|ent buff|
|000029f0| 65 72 27 73 20 66 69 6c | 65 2e 0d 54 68 69 73 20 |er's fil|e..This |
|00002a00| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 6d 6f 72 65 |function| is more|
|00002a10| 20 75 73 65 66 75 6c 20 | 74 68 61 6e 20 5c 5c 5b | useful |than \\[|
|00002a20| 74 65 78 2d 62 75 66 66 | 65 72 5d 20 77 68 65 6e |tex-buff|er] when|
|00002a30| 20 79 6f 75 20 6e 65 65 | 64 20 74 68 65 0d 60 2e | you nee|d the.`.|
|00002a40| 61 75 78 27 20 66 69 6c | 65 20 6f 66 20 4c 61 54 |aux' fil|e of LaT|
|00002a50| 65 58 20 74 6f 20 68 61 | 76 65 20 74 68 65 20 63 |eX to ha|ve the c|
|00002a60| 6f 72 72 65 63 74 20 6e | 61 6d 65 2e 22 0d 20 20 |orrect n|ame.". |
|00002a70| 28 69 6e 74 65 72 61 63 | 74 69 76 65 29 0d 20 20 |(interac|tive). |
|00002a80| 28 6c 65 74 20 28 28 74 | 65 78 2d 6f 75 74 2d 66 |(let ((t|ex-out-f|
|00002a90| 69 6c 65 0d 20 20 20 20 | 20 20 20 20 20 28 69 66 |ile. | (if|
|00002aa0| 20 28 62 75 66 66 65 72 | 2d 66 69 6c 65 2d 6e 61 | (buffer|-file-na|
|00002ab0| 6d 65 29 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |me). | |
|00002ac0| 20 28 66 69 6c 65 2d 6e | 61 6d 65 2d 6e 6f 6e 64 | (file-n|ame-nond|
|00002ad0| 69 72 65 63 74 6f 72 79 | 20 28 62 75 66 66 65 72 |irectory| (buffer|
|00002ae0| 2d 66 69 6c 65 2d 6e 61 | 6d 65 29 29 0d 20 20 20 |-file-na|me)). |
|00002af0| 20 20 20 20 20 20 20 20 | 28 65 72 72 6f 72 20 22 | |(error "|
|00002b00| 42 75 66 66 65 72 20 64 | 6f 65 73 20 6e 6f 74 20 |Buffer d|oes not |
|00002b10| 73 65 65 6d 20 74 6f 20 | 62 65 20 61 73 73 6f 63 |seem to |be assoc|
|00002b20| 69 61 74 65 64 20 77 69 | 74 68 20 61 6e 79 20 66 |iated wi|th any f|
|00002b30| 69 6c 65 22 29 29 29 0d | 09 28 66 69 6c 65 2d 64 |ile"))).|.(file-d|
|00002b40| 69 72 20 28 66 69 6c 65 | 2d 6e 61 6d 65 2d 64 69 |ir (file|-name-di|
|00002b50| 72 65 63 74 6f 72 79 20 | 28 62 75 66 66 65 72 2d |rectory |(buffer-|
|00002b60| 66 69 6c 65 2d 6e 61 6d | 65 29 29 29 29 0d 20 20 |file-nam|e)))). |
|00002b70| 20 20 28 62 61 73 69 63 | 2d 73 61 76 65 2d 62 75 | (basic|-save-bu|
|00002b80| 66 66 65 72 29 20 3b 20 | 41 64 64 65 64 20 62 79 |ffer) ; |Added by|
|00002b90| 20 4b 2e 4f 2e 0d 20 20 | 20 20 28 69 66 20 28 74 | K.O.. | (if (t|
|00002ba0| 65 78 2d 73 68 65 6c 6c | 2d 72 75 6e 6e 69 6e 67 |ex-shell|-running|
|00002bb0| 29 0d 09 28 74 65 78 2d | 6b 69 6c 6c 2d 6a 6f 62 |)..(tex-|kill-job|
|00002bc0| 29 0d 20 20 20 20 20 20 | 28 74 65 78 2d 73 74 61 |). |(tex-sta|
|00002bd0| 72 74 2d 73 68 65 6c 6c | 29 29 0d 20 20 20 20 28 |rt-shell|)). (|
|00002be0| 74 65 78 2d 73 65 6e 64 | 2d 63 6f 6d 6d 61 6e 64 |tex-send|-command|
|00002bf0| 20 74 65 78 2d 73 68 65 | 6c 6c 2d 63 64 2d 63 6f | tex-she|ll-cd-co|
|00002c00| 6d 6d 61 6e 64 20 66 69 | 6c 65 2d 64 69 72 29 0d |mmand fi|le-dir).|
|00002c10| 20 20 20 20 28 74 65 78 | 2d 73 65 6e 64 2d 63 6f | (tex|-send-co|
|00002c20| 6d 6d 61 6e 64 20 74 65 | 78 2d 63 6f 6d 6d 61 6e |mmand te|x-comman|
|00002c30| 64 20 74 65 78 2d 6f 75 | 74 2d 66 69 6c 65 29 0d |d tex-ou|t-file).|
|00002c40| 20 20 29 0d 20 20 20 20 | 28 70 6f 70 2d 74 6f 2d | ). |(pop-to-|
|00002c50| 62 75 66 66 65 72 20 22 | 2a 74 65 78 2d 73 68 65 |buffer "|*tex-she|
|00002c60| 6c 6c 2a 22 29 20 3b 20 | 41 64 64 65 64 20 62 79 |ll*") ; |Added by|
|00002c70| 20 4b 2e 4f 2e 0d 20 20 | 20 20 28 67 6f 74 6f 2d | K.O.. | (goto-|
|00002c80| 63 68 61 72 20 28 70 6f | 69 6e 74 2d 6d 61 78 29 |char (po|int-max)|
|00002c90| 29 20 3b 20 41 64 64 65 | 64 20 62 79 20 4b 2e 4f |) ; Adde|d by K.O|
|00002ca0| 2e 0d 20 20 28 73 65 74 | 71 20 74 65 78 2d 6c 61 |.. (set|q tex-la|
|00002cb0| 73 74 2d 62 75 66 66 65 | 72 2d 74 65 78 65 64 20 |st-buffe|r-texed |
|00002cc0| 28 63 75 72 72 65 6e 74 | 2d 62 75 66 66 65 72 29 |(current|-buffer)|
|00002cd0| 29 0d 20 20 28 73 65 74 | 71 20 74 65 78 2d 70 72 |). (set|q tex-pr|
|00002ce0| 69 6e 74 2d 66 69 6c 65 | 20 28 62 75 66 66 65 72 |int-file| (buffer|
|00002cf0| 2d 66 69 6c 65 2d 6e 61 | 6d 65 29 29 0d 29 0d 0d |-file-na|me)).)..|
|00002d00| 0d 28 64 65 66 75 6e 20 | 6d 61 6b 65 2d 66 69 6c |.(defun |make-fil|
|00002d10| 65 20 28 29 0d 20 20 22 | 4d 6f 64 69 66 69 63 61 |e (). "|Modifica|
|00002d20| 74 69 6f 6e 20 6f 66 20 | 74 65 78 2d 66 69 6c 65 |tion of |tex-file|
|00002d30| 2c 20 62 79 20 6c 65 61 | 76 69 6e 67 20 6f 75 74 |, by lea|ving out|
|00002d40| 20 74 68 65 20 74 65 78 | 2d 6f 75 74 2d 66 69 6c | the tex|-out-fil|
|00002d50| 65 20 66 72 6f 6d 20 74 | 65 78 2d 73 65 6e 64 2d |e from t|ex-send-|
|00002d60| 63 6f 6d 6d 61 6e 64 22 | 0d 20 20 28 69 6e 74 65 |command"|. (inte|
|00002d70| 72 61 63 74 69 76 65 29 | 0d 0d 20 20 20 20 28 62 |ractive)|.. (b|
|00002d80| 61 73 69 63 2d 73 61 76 | 65 2d 62 75 66 66 65 72 |asic-sav|e-buffer|
|00002d90| 29 20 3b 20 41 64 64 65 | 64 20 62 79 20 4b 2e 4f |) ; Adde|d by K.O|
|00002da0| 2e 0d 20 20 20 20 28 69 | 66 20 28 74 65 78 2d 73 |.. (i|f (tex-s|
|00002db0| 68 65 6c 6c 2d 72 75 6e | 6e 69 6e 67 29 0d 09 28 |hell-run|ning)..(|
|00002dc0| 74 65 78 2d 6b 69 6c 6c | 2d 6a 6f 62 29 0d 20 20 |tex-kill|-job). |
|00002dd0| 20 20 20 20 28 74 65 78 | 2d 73 74 61 72 74 2d 73 | (tex|-start-s|
|00002de0| 68 65 6c 6c 29 29 0d 20 | 20 20 20 28 74 65 78 2d |hell)). | (tex-|
|00002df0| 73 65 6e 64 2d 63 6f 6d | 6d 61 6e 64 20 74 65 78 |send-com|mand tex|
|00002e00| 2d 73 68 65 6c 6c 2d 63 | 64 2d 63 6f 6d 6d 61 6e |-shell-c|d-comman|
|00002e10| 64 20 28 66 69 6c 65 2d | 6e 61 6d 65 2d 64 69 72 |d (file-|name-dir|
|00002e20| 65 63 74 6f 72 79 20 28 | 62 75 66 66 65 72 2d 66 |ectory (|buffer-f|
|00002e30| 69 6c 65 2d 6e 61 6d 65 | 29 29 29 0d 20 20 20 20 |ile-name|))). |
|00002e40| 28 74 65 78 2d 73 65 6e | 64 2d 63 6f 6d 6d 61 6e |(tex-sen|d-comman|
|00002e50| 64 20 74 65 78 2d 63 6f | 6d 6d 61 6e 64 29 0d 20 |d tex-co|mmand). |
|00002e60| 20 20 20 28 70 6f 70 2d | 74 6f 2d 62 75 66 66 65 | (pop-|to-buffe|
|00002e70| 72 20 22 2a 74 65 78 2d | 73 68 65 6c 6c 2a 22 29 |r "*tex-|shell*")|
|00002e80| 20 3b 20 41 64 64 65 64 | 20 62 79 20 4b 2e 4f 2e | ; Added| by K.O.|
|00002e90| 0d 20 20 20 20 28 67 6f | 74 6f 2d 63 68 61 72 20 |. (go|to-char |
|00002ea0| 28 70 6f 69 6e 74 2d 6d | 61 78 29 29 20 3b 20 41 |(point-m|ax)) ; A|
|00002eb0| 64 64 65 64 20 62 79 20 | 4b 2e 4f 2e 0d 20 20 28 |dded by |K.O.. (|
|00002ec0| 73 65 74 71 20 74 65 78 | 2d 6c 61 73 74 2d 62 75 |setq tex|-last-bu|
|00002ed0| 66 66 65 72 2d 74 65 78 | 65 64 20 28 63 75 72 72 |ffer-tex|ed (curr|
|00002ee0| 65 6e 74 2d 62 75 66 66 | 65 72 29 29 0d 20 20 28 |ent-buff|er)). (|
|00002ef0| 73 65 74 71 20 74 65 78 | 2d 70 72 69 6e 74 2d 66 |setq tex|-print-f|
|00002f00| 69 6c 65 20 28 62 75 66 | 66 65 72 2d 66 69 6c 65 |ile (buf|fer-file|
|00002f10| 2d 6e 61 6d 65 29 29 0d | 29 0d 0d 0d 28 64 65 66 |-name)).|)...(def|
|00002f20| 75 6e 20 74 65 78 2d 67 | 65 6e 65 72 61 74 65 2d |un tex-g|enerate-|
|00002f30| 7a 61 70 2d 66 69 6c 65 | 2d 6e 61 6d 65 20 28 29 |zap-file|-name ()|
|00002f40| 0d 20 20 22 47 65 6e 65 | 72 61 74 65 20 61 20 75 |. "Gene|rate a u|
|00002f50| 6e 69 71 75 65 20 6e 61 | 6d 65 20 73 75 69 74 61 |nique na|me suita|
|00002f60| 62 6c 65 20 66 6f 72 20 | 75 73 65 20 61 73 20 61 |ble for |use as a|
|00002f70| 20 66 69 6c 65 20 6e 61 | 6d 65 2e 22 0d 20 20 3b | file na|me.". ;|
|00002f80| 3b 20 49 6e 63 6c 75 64 | 65 20 74 68 65 20 73 68 |; Includ|e the sh|
|00002f90| 65 6c 6c 20 70 72 6f 63 | 65 73 73 20 6e 75 6d 62 |ell proc|ess numb|
|00002fa0| 65 72 20 61 6e 64 20 68 | 6f 73 74 20 6e 61 6d 65 |er and h|ost name|
|00002fb0| 0d 20 20 3b 3b 20 69 6e | 20 63 61 73 65 20 74 68 |. ;; in| case th|
|00002fc0| 65 72 65 20 61 72 65 20 | 6d 75 6c 74 69 70 6c 65 |ere are |multiple|
|00002fd0| 20 73 68 65 6c 6c 73 20 | 28 66 6f 72 20 73 61 6d | shells |(for sam|
|00002fe0| 65 20 6f 72 20 64 69 66 | 66 65 72 65 6e 74 20 75 |e or dif|ferent u|
|00002ff0| 73 65 72 29 2e 0d 20 20 | 28 66 6f 72 6d 61 74 20 |ser).. |(format |
|00003000| 22 23 74 7a 25 64 25 73 | 22 0d 20 20 20 20 20 20 |"#tz%d%s|". |
|00003010| 20 20 20 20 28 70 72 6f | 63 65 73 73 2d 69 64 20 | (pro|cess-id |
|00003020| 28 67 65 74 2d 62 75 66 | 66 65 72 2d 70 72 6f 63 |(get-buf|fer-proc|
|00003030| 65 73 73 20 22 2a 74 65 | 78 2d 73 68 65 6c 6c 2a |ess "*te|x-shell*|
|00003040| 22 29 29 0d 09 20 20 28 | 74 65 78 2d 73 74 72 69 |")).. (|tex-stri|
|00003050| 70 2d 64 6f 74 73 20 28 | 73 79 73 74 65 6d 2d 6e |p-dots (|system-n|
|00003060| 61 6d 65 29 29 29 29 0d | 0d 28 64 65 66 75 6e 20 |ame)))).|.(defun |
|00003070| 74 65 78 2d 73 74 72 69 | 70 2d 64 6f 74 73 20 28 |tex-stri|p-dots (|
|00003080| 73 29 0d 20 20 28 73 65 | 74 71 20 73 20 28 63 6f |s). (se|tq s (co|
|00003090| 70 79 2d 73 65 71 75 65 | 6e 63 65 20 73 29 29 0d |py-seque|nce s)).|
|000030a0| 20 20 28 77 68 69 6c 65 | 20 28 73 74 72 69 6e 67 | (while| (string|
|000030b0| 2d 6d 61 74 63 68 20 22 | 5c 5c 2e 22 20 73 29 0d |-match "|\\." s).|
|000030c0| 20 20 20 20 28 61 73 65 | 74 20 73 20 28 6d 61 74 | (ase|t s (mat|
|000030d0| 63 68 2d 62 65 67 69 6e | 6e 69 6e 67 20 30 29 20 |ch-begin|ning 0) |
|000030e0| 3f 2d 29 29 0d 20 20 73 | 29 0d 0d 3b 3b 20 54 68 |?-)). s|)..;; Th|
|000030f0| 69 73 20 77 69 6c 6c 20 | 70 65 72 68 61 70 73 20 |is will |perhaps |
|00003100| 62 65 20 75 73 65 66 75 | 6c 20 66 6f 72 20 6d 6f |be usefu|l for mo|
|00003110| 64 69 66 79 69 6e 67 20 | 54 45 58 49 4e 50 55 54 |difying |TEXINPUT|
|00003120| 53 2e 0d 3b 3b 20 45 78 | 70 61 6e 64 20 65 61 63 |S..;; Ex|pand eac|
|00003130| 68 20 66 69 6c 65 20 6e | 61 6d 65 2c 20 73 65 70 |h file n|ame, sep|
|00003140| 61 72 61 74 65 64 20 62 | 79 20 63 6f 6c 6f 6e 73 |arated b|y colons|
|00003150| 2c 20 69 6e 20 74 68 65 | 20 73 74 72 69 6e 67 20 |, in the| string |
|00003160| 53 2e 0d 28 64 65 66 75 | 6e 20 74 65 78 2d 65 78 |S..(defu|n tex-ex|
|00003170| 70 61 6e 64 2d 66 69 6c | 65 73 20 28 73 29 0d 20 |pand-fil|es (s). |
|00003180| 20 28 6c 65 74 20 28 65 | 6c 74 73 20 28 73 74 61 | (let (e|lts (sta|
|00003190| 72 74 20 30 29 29 0d 20 | 20 20 20 28 77 68 69 6c |rt 0)). | (whil|
|000031a0| 65 20 28 73 74 72 69 6e | 67 2d 6d 61 74 63 68 20 |e (strin|g-match |
|000031b0| 22 3a 22 20 73 20 73 74 | 61 72 74 29 0d 20 20 20 |":" s st|art). |
|000031c0| 20 20 20 28 73 65 74 71 | 20 65 6c 74 73 20 28 63 | (setq| elts (c|
|000031d0| 6f 6e 73 20 28 73 75 62 | 73 74 72 69 6e 67 20 73 |ons (sub|string s|
|000031e0| 20 73 74 61 72 74 20 28 | 6d 61 74 63 68 2d 62 65 | start (|match-be|
|000031f0| 67 69 6e 6e 69 6e 67 20 | 30 29 29 20 65 6c 74 73 |ginning |0)) elts|
|00003200| 29 29 0d 20 20 20 20 20 | 20 28 73 65 74 71 20 73 |)). | (setq s|
|00003210| 74 61 72 74 20 28 6d 61 | 74 63 68 2d 65 6e 64 20 |tart (ma|tch-end |
|00003220| 30 29 29 29 0d 20 20 20 | 20 28 6f 72 20 28 3d 20 |0))). | (or (= |
|00003230| 73 74 61 72 74 20 30 29 | 0d 09 28 73 65 74 71 20 |start 0)|..(setq |
|00003240| 65 6c 74 73 20 28 63 6f | 6e 73 20 28 73 75 62 73 |elts (co|ns (subs|
|00003250| 74 72 69 6e 67 20 73 20 | 73 74 61 72 74 29 20 65 |tring s |start) e|
|00003260| 6c 74 73 29 29 29 0d 20 | 20 20 20 28 6d 61 70 63 |lts))). | (mapc|
|00003270| 6f 6e 63 61 74 20 27 65 | 78 70 61 6e 64 2d 66 69 |oncat 'e|xpand-fi|
|00003280| 6c 65 2d 6e 61 6d 65 20 | 28 6e 72 65 76 65 72 73 |le-name |(nrevers|
|00003290| 65 20 65 6c 74 73 29 20 | 22 3a 22 29 29 29 0d 0d |e elts) |":")))..|
|000032a0| 28 64 65 66 75 6e 20 74 | 65 78 2d 73 68 65 6c 6c |(defun t|ex-shell|
|000032b0| 2d 72 75 6e 6e 69 6e 67 | 20 28 29 0d 20 20 28 61 |-running| (). (a|
|000032c0| 6e 64 20 28 67 65 74 2d | 70 72 6f 63 65 73 73 20 |nd (get-|process |
|000032d0| 22 74 65 78 2d 73 68 65 | 6c 6c 22 29 0d 20 20 20 |"tex-she|ll"). |
|000032e0| 20 20 20 20 28 65 71 20 | 28 70 72 6f 63 65 73 73 | (eq |(process|
|000032f0| 2d 73 74 61 74 75 73 20 | 28 67 65 74 2d 70 72 6f |-status |(get-pro|
|00003300| 63 65 73 73 20 22 74 65 | 78 2d 73 68 65 6c 6c 22 |cess "te|x-shell"|
|00003310| 29 29 20 27 72 75 6e 29 | 29 29 0d 0d 28 64 65 66 |)) 'run)|))..(def|
|00003320| 75 6e 20 74 65 78 2d 6b | 69 6c 6c 2d 6a 6f 62 20 |un tex-k|ill-job |
|00003330| 28 29 0d 20 20 22 4b 69 | 6c 6c 20 74 68 65 20 63 |(). "Ki|ll the c|
|00003340| 75 72 72 65 6e 74 6c 79 | 20 72 75 6e 6e 69 6e 67 |urrently| running|
|00003350| 20 54 65 58 20 6a 6f 62 | 2e 22 0d 20 20 28 69 6e | TeX job|.". (in|
|00003360| 74 65 72 61 63 74 69 76 | 65 29 0d 20 20 28 71 75 |teractiv|e). (qu|
|00003370| 69 74 2d 70 72 6f 63 65 | 73 73 20 28 67 65 74 2d |it-proce|ss (get-|
|00003380| 70 72 6f 63 65 73 73 20 | 22 74 65 78 2d 73 68 65 |process |"tex-she|
|00003390| 6c 6c 22 29 20 74 29 29 | 0d 0d 28 64 65 66 75 6e |ll") t))|..(defun|
|000033a0| 20 74 65 78 2d 70 72 69 | 6e 74 20 28 26 6f 70 74 | tex-pri|nt (&opt|
|000033b0| 69 6f 6e 61 6c 20 61 6c | 74 29 0d 20 20 22 50 72 |ional al|t). "Pr|
|000033c0| 69 6e 74 20 74 68 65 20 | 2e 64 76 69 20 66 69 6c |int the |.dvi fil|
|000033d0| 65 20 6d 61 64 65 20 62 | 79 20 5c 5c 5b 74 65 78 |e made b|y \\[tex|
|000033e0| 2d 72 65 67 69 6f 6e 5d | 2c 20 5c 5c 5b 74 65 78 |-region]|, \\[tex|
|000033f0| 2d 62 75 66 66 65 72 5d | 20 6f 72 20 5c 5c 5b 74 |-buffer]| or \\[t|
|00003400| 65 78 2d 66 69 6c 65 5d | 2e 0d 52 75 6e 73 20 74 |ex-file]|..Runs t|
|00003410| 68 65 20 73 68 65 6c 6c | 20 63 6f 6d 6d 61 6e 64 |he shell| command|
|00003420| 20 64 65 66 69 6e 65 64 | 20 62 79 20 74 65 78 2d | defined| by tex-|
|00003430| 64 76 69 2d 70 72 69 6e | 74 2d 63 6f 6d 6d 61 6e |dvi-prin|t-comman|
|00003440| 64 2e 20 20 49 66 20 70 | 72 65 66 69 78 20 61 72 |d. If p|refix ar|
|00003450| 67 75 6d 65 6e 74 0d 69 | 73 20 70 72 6f 76 69 64 |gument.i|s provid|
|00003460| 65 64 2c 20 75 73 65 20 | 74 68 65 20 61 6c 74 65 |ed, use |the alte|
|00003470| 72 6e 61 74 69 76 65 20 | 63 6f 6d 6d 61 6e 64 2c |rnative |command,|
|00003480| 20 74 65 78 2d 61 6c 74 | 2d 64 76 69 2d 70 72 69 | tex-alt|-dvi-pri|
|00003490| 6e 74 2d 63 6f 6d 6d 61 | 6e 64 2e 22 0d 20 20 28 |nt-comma|nd.". (|
|000034a0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 50 22 29 |interact|ive "P")|
|000034b0| 0d 20 20 28 6c 65 74 20 | 28 28 70 72 69 6e 74 2d |. (let |((print-|
|000034c0| 66 69 6c 65 2d 6e 61 6d | 65 2d 64 76 69 20 28 74 |file-nam|e-dvi (t|
|000034d0| 65 78 2d 61 70 70 65 6e | 64 20 74 65 78 2d 70 72 |ex-appen|d tex-pr|
|000034e0| 69 6e 74 2d 66 69 6c 65 | 20 22 2e 64 76 69 22 29 |int-file| ".dvi")|
|000034f0| 29 0d 09 74 65 73 74 2d | 6e 61 6d 65 29 0d 20 20 |)..test-|name). |
|00003500| 20 20 28 69 66 20 28 61 | 6e 64 20 28 6e 6f 74 20 | (if (a|nd (not |
|00003510| 28 65 71 75 61 6c 20 28 | 63 75 72 72 65 6e 74 2d |(equal (|current-|
|00003520| 62 75 66 66 65 72 29 20 | 74 65 78 2d 6c 61 73 74 |buffer) |tex-last|
|00003530| 2d 62 75 66 66 65 72 2d | 74 65 78 65 64 29 29 0d |-buffer-|texed)).|
|00003540| 09 20 20 20 20 20 28 66 | 69 6c 65 2d 6e 65 77 65 |. (f|ile-newe|
|00003550| 72 2d 74 68 61 6e 2d 66 | 69 6c 65 2d 70 0d 09 20 |r-than-f|ile-p.. |
|00003560| 20 20 20 20 20 28 73 65 | 74 71 20 74 65 73 74 2d | (se|tq test-|
|00003570| 6e 61 6d 65 20 28 74 65 | 78 2d 61 70 70 65 6e 64 |name (te|x-append|
|00003580| 20 28 62 75 66 66 65 72 | 2d 66 69 6c 65 2d 6e 61 | (buffer|-file-na|
|00003590| 6d 65 29 20 22 2e 64 76 | 69 22 29 29 0d 09 20 20 |me) ".dv|i")).. |
|000035a0| 20 20 20 20 70 72 69 6e | 74 2d 66 69 6c 65 2d 6e | prin|t-file-n|
|000035b0| 61 6d 65 2d 64 76 69 29 | 29 0d 09 28 73 65 74 71 |ame-dvi)|)..(setq|
|000035c0| 20 70 72 69 6e 74 2d 66 | 69 6c 65 2d 6e 61 6d 65 | print-f|ile-name|
|000035d0| 2d 64 76 69 20 74 65 73 | 74 2d 6e 61 6d 65 29 29 |-dvi tes|t-name))|
|000035e0| 0d 20 20 20 20 28 69 66 | 20 28 6e 6f 74 20 28 66 |. (if| (not (f|
|000035f0| 69 6c 65 2d 65 78 69 73 | 74 73 2d 70 20 70 72 69 |ile-exis|ts-p pri|
|00003600| 6e 74 2d 66 69 6c 65 2d | 6e 61 6d 65 2d 64 76 69 |nt-file-|name-dvi|
|00003610| 29 29 0d 20 20 20 20 20 | 20 20 20 28 65 72 72 6f |)). | (erro|
|00003620| 72 20 22 4e 6f 20 61 70 | 70 72 6f 70 72 69 61 74 |r "No ap|propriat|
|00003630| 65 20 60 2e 64 76 69 27 | 20 66 69 6c 65 20 63 6f |e `.dvi'| file co|
|00003640| 75 6c 64 20 62 65 20 66 | 6f 75 6e 64 22 29 0d 20 |uld be f|ound"). |
|00003650| 20 20 20 20 20 28 74 65 | 78 2d 73 65 6e 64 2d 63 | (te|x-send-c|
|00003660| 6f 6d 6d 61 6e 64 0d 20 | 20 20 20 20 20 20 20 28 |ommand. | (|
|00003670| 69 66 20 61 6c 74 20 74 | 65 78 2d 61 6c 74 2d 64 |if alt t|ex-alt-d|
|00003680| 76 69 2d 70 72 69 6e 74 | 2d 63 6f 6d 6d 61 6e 64 |vi-print|-command|
|00003690| 20 74 65 78 2d 64 76 69 | 2d 70 72 69 6e 74 2d 63 | tex-dvi|-print-c|
|000036a0| 6f 6d 6d 61 6e 64 29 0d | 20 20 20 20 20 20 20 20 |ommand).| |
|000036b0| 70 72 69 6e 74 2d 66 69 | 6c 65 2d 6e 61 6d 65 2d |print-fi|le-name-|
|000036c0| 64 76 69 20 74 29 29 29 | 29 0d 0d 28 64 65 66 75 |dvi t)))|)..(defu|
|000036d0| 6e 20 74 65 78 2d 76 69 | 65 77 20 28 29 0d 20 20 |n tex-vi|ew (). |
|000036e0| 22 50 72 65 76 69 65 77 | 20 74 68 65 20 6c 61 73 |"Preview| the las|
|000036f0| 74 20 60 2e 64 76 69 27 | 20 66 69 6c 65 20 6d 61 |t `.dvi'| file ma|
|00003700| 64 65 20 62 79 20 72 75 | 6e 6e 69 6e 67 20 54 65 |de by ru|nning Te|
|00003710| 58 20 75 6e 64 65 72 20 | 45 6d 61 63 73 2e 0d 54 |X under |Emacs..T|
|00003720| 68 69 73 20 6d 65 61 6e | 73 2c 20 6d 61 64 65 20 |his mean|s, made |
|00003730| 75 73 69 6e 67 20 5c 5c | 5b 74 65 78 2d 72 65 67 |using \\|[tex-reg|
|00003740| 69 6f 6e 5d 2c 20 5c 5c | 5b 74 65 78 2d 62 75 66 |ion], \\|[tex-buf|
|00003750| 66 65 72 5d 20 6f 72 20 | 5c 5c 5b 74 65 78 2d 66 |fer] or |\\[tex-f|
|00003760| 69 6c 65 5d 2e 0d 54 68 | 65 20 76 61 72 69 61 62 |ile]..Th|e variab|
|00003770| 6c 65 20 60 74 65 78 2d | 64 76 69 2d 76 69 65 77 |le `tex-|dvi-view|
|00003780| 2d 63 6f 6d 6d 61 6e 64 | 27 20 73 70 65 63 69 66 |-command|' specif|
|00003790| 69 65 73 20 74 68 65 20 | 73 68 65 6c 6c 20 63 6f |ies the |shell co|
|000037a0| 6d 6d 61 6e 64 20 66 6f | 72 20 70 72 65 76 69 65 |mmand fo|r previe|
|000037b0| 77 2e 22 0d 20 20 28 69 | 6e 74 65 72 61 63 74 69 |w.". (i|nteracti|
|000037c0| 76 65 29 0d 20 20 28 6c | 65 74 20 28 28 74 65 78 |ve). (l|et ((tex|
|000037d0| 2d 64 76 69 2d 70 72 69 | 6e 74 2d 63 6f 6d 6d 61 |-dvi-pri|nt-comma|
|000037e0| 6e 64 20 74 65 78 2d 64 | 76 69 2d 76 69 65 77 2d |nd tex-d|vi-view-|
|000037f0| 63 6f 6d 6d 61 6e 64 29 | 29 0d 20 20 20 20 28 74 |command)|). (t|
|00003800| 65 78 2d 70 72 69 6e 74 | 29 29 29 0d 0d 28 64 65 |ex-print|)))..(de|
|00003810| 66 75 6e 20 74 65 78 2d | 61 70 70 65 6e 64 20 28 |fun tex-|append (|
|00003820| 66 69 6c 65 2d 6e 61 6d | 65 20 73 75 66 66 69 78 |file-nam|e suffix|
|00003830| 29 0d 20 20 22 41 70 70 | 65 6e 64 20 74 6f 20 46 |). "App|end to F|
|00003840| 49 4c 45 4e 41 4d 45 20 | 74 68 65 20 73 75 66 66 |ILENAME |the suff|
|00003850| 69 78 20 53 55 46 46 49 | 58 2c 20 75 73 69 6e 67 |ix SUFFI|X, using|
|00003860| 20 73 61 6d 65 20 61 6c | 67 6f 72 69 74 68 6d 20 | same al|gorithm |
|00003870| 54 65 58 20 75 73 65 73 | 2e 0d 53 63 61 6e 73 20 |TeX uses|..Scans |
|00003880| 66 6f 72 20 74 68 65 20 | 66 69 72 73 74 20 28 6e |for the |first (n|
|00003890| 6f 74 20 6c 61 73 74 29 | 20 70 65 72 69 6f 64 2e |ot last)| period.|
|000038a0| 0d 4e 6f 20 70 65 72 69 | 6f 64 20 69 73 20 72 65 |.No peri|od is re|
|000038b0| 74 61 69 6e 65 64 20 69 | 6d 6d 65 64 69 61 74 65 |tained i|mmediate|
|000038c0| 6c 79 20 62 65 66 6f 72 | 65 20 53 55 46 46 49 58 |ly befor|e SUFFIX|
|000038d0| 2c 0d 73 6f 20 6e 6f 72 | 6d 61 6c 6c 79 20 53 55 |,.so nor|mally SU|
|000038e0| 46 46 49 58 20 73 74 61 | 72 74 73 20 77 69 74 68 |FFIX sta|rts with|
|000038f0| 20 6f 6e 65 2e 22 0d 20 | 20 28 69 66 20 28 73 74 | one.". | (if (st|
|00003900| 72 69 6e 67 70 20 66 69 | 6c 65 2d 6e 61 6d 65 29 |ringp fi|le-name)|
|00003910| 0d 20 20 20 20 20 20 28 | 6c 65 74 20 28 28 66 69 |. (|let ((fi|
|00003920| 6c 65 20 28 66 69 6c 65 | 2d 6e 61 6d 65 2d 6e 6f |le (file|-name-no|
|00003930| 6e 64 69 72 65 63 74 6f | 72 79 20 66 69 6c 65 2d |ndirecto|ry file-|
|00003940| 6e 61 6d 65 29 29 29 0d | 09 28 63 6f 6e 63 61 74 |name))).|.(concat|
|00003950| 20 28 66 69 6c 65 2d 6e | 61 6d 65 2d 64 69 72 65 | (file-n|ame-dire|
|00003960| 63 74 6f 72 79 20 66 69 | 6c 65 2d 6e 61 6d 65 29 |ctory fi|le-name)|
|00003970| 0d 09 09 28 73 75 62 73 | 74 72 69 6e 67 20 66 69 |...(subs|tring fi|
|00003980| 6c 65 20 30 0d 09 09 09 | 20 20 20 28 73 74 72 69 |le 0....| (stri|
|00003990| 6e 67 2d 6d 61 74 63 68 | 20 22 5c 5c 2e 22 20 66 |ng-match| "\\." f|
|000039a0| 69 6c 65 29 29 0d 09 09 | 73 75 66 66 69 78 29 29 |ile))...|suffix))|
|000039b0| 0d 20 20 20 20 22 20 22 | 29 29 0d 0d |. " "|)).. |
+--------+-------------------------+-------------------------+--------+--------+